This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Get A Schematic Folder In A Schematic Dataset From The SchematicFolder Name Snippet (ArcObjects .NET 10.4 SDK) |
Retrieve a schematic folder in a given schematic dataset from its name
/// <summary> /// Retrieve a SchematicFolder in a given SchematicDataset from its name /// <param name="schemDataset">The SchematicDataset containing the SchematicFolder</param> /// <param name="FolderName">The name of the SchematicFolder to retrieve</param> /// <returns>The restrieved ESRI.ArcGIS.Schematic.ISchematicFolder</returns> public ESRI.ArcGIS.Schematic.ISchematicFolder GetSchematicFolderFromSchematicDatasetByName(ESRI.ArcGIS.Schematic.ISchematicDataset schemDataset, string FolderName) { // cast SchematicDataset into ISchematicFolderContainer ESRI.ArcGIS.Schematic.ISchematicFolderContainer schDiagramCont=(ESRI.ArcGIS.Schematic.ISchematicFolderContainer)schemDataset; return schDiagramCont.get_SchematicFolderByName(FolderName); }
''' <summary> ''' Retrieve a SchematicFolder in a given SchematicDataset from its name ''' </summary> ''' <param name="schemDataset">The SchematicDataset containing the SchematicFolder</param> ''' <param name="FolderName">The name of the SchematicFolder to retrieve</param> ''' <returns>The restrieved ESRI.ArcGIS.Schematic.ISchematicFolder</returns> Public Function GetSchematicFolderFromSchematicDatasetByName(ByVal schemDataset As ESRI.ArcGIS.Schematic.ISchematicDataset, ByVal FolderName As String) As ESRI.ArcGIS.Schematic.ISchematicFolder ' cast SchematicDataset into ISchematicFolderContainer Dim schDiagramCont As ESRI.ArcGIS.Schematic.ISchematicFolderContainer=TryCast(schemDataset, ESRI.ArcGIS.Schematic.ISchematicFolderContainer) Return schDiagramCont.SchematicFolderByName(FolderName) End Function