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


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

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

Retrieve a SchematicFolder in another schematic folder from its ID

[C#]
        /// <summary>
        /// Retrieve a SchematicFolder in another schematic folder from its ID
        /// </summary>
        /// <param name="schemFolder">The SchematicFolder which contains the searched schematic folder</param>
        /// <param name="FolderId">The ID of the schematic folder you want to retrieve</param>
        /// <returns>The retrieved ISchematicFolder</returns>
        public ESRI.ArcGIS.Schematic.ISchematicFolder GetSchematicFolderFromSchematicFolderById(ESRI.ArcGIS.Schematic.ISchematicFolder schemFolder, int FolderId)
        {

                // cast SchematicFolder into ISchematicFolderContainer
                ESRI.ArcGIS.Schematic.ISchematicFolderContainer schDiagramCont=(ESRI.ArcGIS.Schematic.ISchematicFolderContainer)schemFolder;

                return schDiagramCont.get_SchematicFolderByID(FolderId);
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Retrieve a SchematicFolder in another schematic folder from its ID
        ''' </summary>
        ''' <param name="schemFolder">The SchematicFolder which contains the searched schematic folder</param>
        ''' <param name="FolderId">The ID of the schematic folder you want to retrieve</param>
        ''' <returns>The retrieved ISchematicFolder</returns>
        Public Function GetSchematicFolderFromSchematicFolderById(ByVal schemFolder As ESRI.ArcGIS.Schematic.ISchematicFolder, ByVal FolderId As Integer) As ESRI.ArcGIS.Schematic.ISchematicFolder

                ' cast SchematicFolder into ISchematicFolderContainer
                Dim schDiagramCont As ESRI.ArcGIS.Schematic.ISchematicFolderContainer=TryCast(schemFolder, 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