Creating a Symbol by Script

You create the associated symbol of an object by attaching it to the active diagram using the following method: AttachObject(ByVal Obj As BaseObject) As BaseObject.

Example

set symbol1 = ActiveDiagram.AttachObject(entity1)
Note: The AttachObject method can also be used to create a graphical synonym or a shortcut. For more information, see sections on graphical synonym and shortcut creation.