This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Get A SchematicInMemoryDiagram Based On A Schematic Diagram Class Snippet (ArcObjects .NET 10.4 SDK) |
Retrieve a particular SchematicInMemoryDiagram based on a given SchematicDiagramClass from its name
/// <summary> /// Retrieve a particular SchematicInMemoryDiagram based on a given SchematicDiagramClass from its name /// </summary> /// <param name="schemDiagramClass">The SchematicDiagramClass on which the diagram is based</param> /// <param name="InMemoryDiagramName">The name of the schematic in-memory diagram to retrieve</param> /// <returns>The retrieved SchematicInMemoryDiagram</returns> public ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagram GetSchematicInMemoryDiagramFromDiagramClassByName(ESRI.ArcGIS.Schematic.ISchematicDiagramClass schemDiagramClass, string InMemoryDiagramName) { // cast SchematicDiagramClass to ISchematicInMemoryDiagramContainer ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagramContainer schInMemoryDiagramCont=(ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagramContainer)schemDiagramClass; return schInMemoryDiagramCont.GetSchematicInMemoryDiagram(InMemoryDiagramName); }
''' <summary> ''' Retrieve a particular SchematicInMemoryDiagram based on a given SchematicDiagramClass from its name ''' </summary> ''' <param name="schemDiagramClass">The SchematicDiagramClass on which the diagram is based</param> ''' <param name="InMemoryDiagramName">The name of the schematic in-memory diagram to retrieve</param> ''' <returns>The retrieved SchematicInMemoryDiagram</returns> Public Function GetSchematicInMemoryDiagramFromDiagramClassByName(ByVal schemDiagramClass As ESRI.ArcGIS.Schematic.ISchematicDiagramClass, ByVal InMemoryDiagramName As String) As ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagram ' cast SchematicDiagramClass into ISchematicInMemoryDiagramContainer Dim schInMemoryDiagramCont As ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagramContainer=TryCast(schemDiagramClass, ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagramContainer) Return schInMemoryDiagramCont.GetSchematicInMemoryDiagram(InMemoryDiagramName) End Function