This document is archived and information here might be outdated. Recommended version. |
Retrieve a SchematicDatasource in a given SchematicDataset from its name
/// <summary> /// Retrieve a SchematicElementClass in a given SchematicDataset from its name /// </summary> /// <param name="schemDataset">The SchematicDataset where the SchematicElementClass is stored</param> /// <param name="ElementClassName">The name of the SchematicElementClass to retrieve</param> /// <returns>The retrieved ESRI.ArcGIS.Schematic.ISchematicElementClass</returns> public ESRI.ArcGIS.Schematic.ISchematicDataSource GetSchematicElementClassFromSchematicDatasetByName(ESRI.ArcGIS.Schematic.ISchematicDataset schemDataset, string ElementClassName) { // cast SchematicDataset into ISchematicElementClassContainer ESRI.ArcGIS.Schematic.ISchematicElementClassContainer schDiagramCont=(ESRI.ArcGIS.Schematic.ISchematicElementClassContainer)schemDataset; return schDiagramCont.GetSchematicElementClass(ElementClassName); }
''' <summary> ''' Retrieve a SchematicDatasource in a given SchematicDataset from its name ''' </summary> ''' <param name="schemDataset">The SchematicDataset where the SchematicDataSource is referenced</param> ''' <param name="DataSourceName">The name of the SchematicDataSource to retrieve</param> ''' <returns>The retrieved ESRI.ArcGIS.Schematic.ISchematicDataSource</returns> Public Function GetSchematicDataSourceFromSchematicDatasetByName(ByVal schemDataset As ESRI.ArcGIS.Schematic.ISchematicDataset, ByVal DataSourceName As String) As ESRI.ArcGIS.Schematic.ISchematicDataSource ' cast SchematicDataset into ISchematicDataSourceContainer Dim schDiagramCont As ESRI.ArcGIS.Schematic.ISchematicDataSourceContainer=TryCast(schemDataset, ESRI.ArcGIS.Schematic.ISchematicDataSourceContainer) Return schDiagramCont.GetSchematicDataSource(DataSourceName) End Function