This document is archived and information here might be outdated. Recommended version. |
Retrieve a schematic diagram class in a given schematic dataset from its name
/// <summary> /// Retrieve a SchematicDiagramClass in a given SchematicDataset /// </summary> /// <param name="schemDataset">The SchematicDataset containing the SchematicDiagramClass</param> /// <param name="DiagramClassName">The name of the SchematicDiagramClass to retrieve</param> /// <returns>ESRI.ArcGIS.Schematic.ISchematicDiagramClass</returns> public ESRI.ArcGIS.Schematic.ISchematicDiagramClass GetSchematicDiagramClassFromSchematicDatasetByName(ESRI.ArcGIS.Schematic.ISchematicDataset schemDataset, string DiagramClassName) { // cast SchematicDataset into ISchematicDiagramClassContainer ESRI.ArcGIS.Schematic.ISchematicDiagramClassContainer schDiagramClassCont=(ESRI.ArcGIS.Schematic.ISchematicDiagramClassContainer)schemDataset; // retrieve the desired SchematicDiagramClass in the schematic dataset container return schDiagramClassCont.GetSchematicDiagramClass(DiagramClassName); }
''' <summary> ''' Retrieve a SchematicDiagramClass in a given SchematicDataset ''' </summary> ''' <param name="schemDataset">The SchematicDataset containing the SchematicDiagramClass</param> ''' <param name="DiagramClassName">The name of the SchematicDiagramClass to retrieve</param> ''' <returns>ESRI.ArcGIS.Schematic.ISchematicDiagramClass</returns> Public Function GetSchematicDiagramClassFromSchematicDatasetByName(ByVal schemDataset As ESRI.ArcGIS.Schematic.ISchematicDataset, ByVal DiagramClassName As String) As ESRI.ArcGIS.Schematic.ISchematicDiagramClass ' cast SchematicDataset into ISchematicDiagramClassContainer Dim schDiagramClassCont As ESRI.ArcGIS.Schematic.ISchematicDiagramClassContainer=TryCast(schemDataset, ESRI.ArcGIS.Schematic.ISchematicDiagramClassContainer) ' retrieve the desired SchematicDiagramClass in the schematic dataset container Return schDiagramClassCont.GetSchematicDiagramClass(DiagramClassName) End Function