Customization > Automation Interface > Functions > For User Interface > Functions for diagrams > SelectSymbol2 function (automation interface)
  
SelectSymbol2 function (automation interface)
Syntax:
SelectSymbol2("<diagram id>", "<item id>")
Where:
<diagramid> is a string that specifies the id of the diagram.
<itemid> is a string that specifies the id of the item to find.
SelectSymbol2 selects a symbol on a diagram using the Id properties of the diagram and the symbol. The function searches for the requested symbol on the diagram and returns a Boolean value to indicate success or failure.
SelectSymbol2 allows for the selection of symbols not represented in the dictionary, such as class instances on a Sequence Diagram.
Examples
In this example, the SelectSymbol2 function is used to select the My Class class on a Class Diagram through the symbol's Id.
My Class appears on only one diagram so we can use the Using Diagram association to obtain that diagram, and the Representing Symbol association to obtain the symbol on that diagram.
Set objItem = Dictionary.Item("Class", "My Class")
Set objDiagram = objItem.item("Using Diagram")
Set objSymbol = objItem.item("Representing Symbol")
Result = Studio.SelectSymbol2(objDiagram("Id"), objSymbol("Id"))