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


Add A SchematicBuilderRule On A Schematic Diagram Class Snippet (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference

Add A SchematicBuilderRule On A Schematic Diagram Class Snippet

[C#]
[Visual Basic .NET]
        ''' <summary>
        ''' Add a SchematicBuilderRule on a Schematic Diagram Class
        ''' </summary>
        ''' <param name="schemDiagramClass">The SchematicDiagramClass on which the schematic rule must be added</param>
        ''' <returns>The added SchematicBuilderRule</returns>
        Public Function AddSchematicBuilderRuleFromDiagramClass(ByVal schemDiagramClass As ESRI.ArcGIS.Schematic.ISchematicDiagramClass) As ESRI.ArcGIS.Schematic.ISchematicBuilderRule

                ' cast SchematicDiagramClass into ISchematicBuilderRuleContainerEdit
                Dim schBuilderRuleEditCont As ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainerEdit=TryCast(schemDiagramClass, ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainerEdit)

                Return schBuilderRuleEditCont.AddSchematicBuilderRule()
        End Function

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