This document is archived and information here might be outdated.  Recommended version.


Get A Schematic Folder In A Schematic Dataset From The SchematicFolder Name Snippet (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference

Get A Schematic Folder In A Schematic Dataset From The SchematicFolder Name Snippet

Retrieve a schematic folder in a given schematic dataset from its name

[C#]
        /// <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);
        }
[Visual Basic .NET]
        ''' <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

Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • ESRI.ArcGIS.Schematic