Copy Example
Examples
l Surfaces
Sub Example_Copy_Prototypes()
' This example copies a the first prototype in the collection
' to a "Copy of " the first prototype..
Dim prots As AeccPrototypes
Dim prot As AeccPrototype
Dim protcopy As AeccPrototype
Set prots = AeccApplication.Prototypes
Set prot = prots.Item(0)
Dim source As String
Dim target As String
' Get the source and target prototype names
source = prot.Name
target = "Copy of " & source
' Make copy of prototype
Set protcopy = prots.Copy(source, target)
MsgBox "The copied prototype is named: " & protcopy.Name, vbInformation, "Copy Example"
End Sub
Sub Example_Copy_Surfaces()
' This example copies a surface.
Dim surfs As AeccSurfaces
Dim surf As AeccSurface
Dim surfCopy As AeccSurface
Set surfs = AeccApplication.ActiveProject.Surfaces
Set surf = surfs.Item(0)
Dim source As String
' Get name of surface to copy
source = surf.Name
Set surfCopy = surfs.Copy(source)
MsgBox "The copied surface is named: " & surfCopy.Name, vbInformation, "Copy Example"
End Sub