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


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

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

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

[C#]
        /// <summary>
        /// Retrieve a SchematicFolder in a given SchematicDataset from its ID
        /// </summary>
        /// <param name="schemDataset">The SchematicDataset containing the SchematicFolder</param>
        /// <param name="FolderId">The ID of the SchematicFolder to retrieve</param>
        /// <returns>The restrieved ESRI.ArcGIS.Schematic.ISchematicFolder</returns>
        public ESRI.ArcGIS.Schematic.ISchematicFolder GetSchematicFolderFromSchematicDatasetById(ESRI.ArcGIS.Schematic.ISchematicDataset schemDataset, int FolderId)
        {

                // cast SchematicDataset into ISchematicFolderContainer
                ESRI.ArcGIS.Schematic.ISchematicFolderContainer schDiagramCont=(ESRI.ArcGIS.Schematic.ISchematicFolderContainer)schemDataset;

                return schDiagramCont.get_SchematicFolderByID(FolderId);
        }
[Visual Basic .NET]
        ''' <summary>
        '''Retrieve a SchematicFolder in a given SchematicDataset from its ID
        ''' </summary>
        ''' <param name="schemDataset">The SchematicDataset containing the SchematicFolder</param>
        ''' <param name="FolderId">The ID of the SchematicFolder to retrieve</param>
        ''' <returns>The restrieved ESRI.ArcGIS.Schematic.ISchematicFolder</returns>
        Public Function GetSchematicFolderFromSchematicDatasetById(ByVal schemDataset As ESRI.ArcGIS.Schematic.ISchematicDataset, ByVal FolderId As Integer) As ESRI.ArcGIS.Schematic.ISchematicFolder

                ' cast SchematicDataset into ISchematicFolderContainer
                Dim schDiagramCont As ESRI.ArcGIS.Schematic.ISchematicFolderContainer=TryCast(schemDataset, ESRI.ArcGIS.Schematic.ISchematicFolderContainer)

                Return schDiagramCont.SchematicFolderByID(FolderId)
        End Function

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