Opens the diagram named 'diagramName' implemented by the diagram type.
[Visual Basic 6.0] Function OpenDiagram(
ByVal diagramName As String, _
[ByVal Restore As Boolean] _
) As INgDiagram
[Visual Basic .NET] Public Function OpenDiagram ( _ ByVal diagramName As String, _ [ByVal Restore As Boolean] _ ) As INgDiagram
[C#] public INgDiagram OpenDiagram ( string diagramName, bool Restore );
Optional Values
[Java] public INgDiagram openDiagram ( String diagramName, Boolean Restore ) throws IOException, AutomationException
[C++] HRESULT OpenDiagram( BSTR diagramName, VARIANT_BOOL Restore, INgDiagram** pVal );
Parameters
diagramName [in]
diagramName is a parameter of type BSTR
Restore [in, optional, defaultvalue(VARIANT_TRUE)]
Restore is a parameter of type VARIANT_BOOL
pVal [out, retval]
pVal is a parameter of type INgDiagram
Note that the diagramName parameter must be consistent with the diagram name identifier definition for its associated diagram type.
Several Schematic event procedures are automatically chained during a diagram opening. For more details on these events' chaining, please see the Remarks section available from the INgDiagram Open method help-page.
Here is a sample call of the OpenDiagram method:
Dim pDiagramType As INgDiagramType
Dim pDiagram As INgDiagram
Dim DiagramName As String
...
' Creating the new diagram
DiagramName = "Schematic_" & pDiagramType.Diagrams.Count + 1
pDiagramType.OpenDiagram DiagramName
INgDiagramType Interface | INgDiagram.Open Method | INgProject.OpenDiagram Method | INgProjectEvents.BeforeOpenDiagram Event