Customization > Automation Interface > Functions > For User Interface > Function for Panes > Function for the diagram pane > SelectDiagram function (automation interface)
  
SelectDiagram function (automation interface)
Syntax:
SelectDiagram("<id>")
Where:
<id> is a string that specifies the id of the diagram to select.
SelectDiagram uses a diagram object's Id property to select the diagram in the Diagrams pane. This function returns a Boolean value to indicate success or failure.
Examples
In this example, the script selects the My Class Diagram class diagram in the Diagrams pane through the diagram's Id.
Set objDiagrams = ActiveProject.Item("Diagrams")
Set objDiagram = objDiagrams.Item("Class Diagram", "My Class Diagram")
Studio.SelectDiagram(objDiagram("Id"))