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


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

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

Retrieve a SchematicFolder in another schematic folder from its name

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

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

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

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