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


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

Move A SchematicBuilderRule On A Schematic Diagram Class Snippet

Move a schematic rule on a schematic diagram class to a specific position

[C#]
        /// <summary>
        /// Move a SchematicBuilderRule on a SchematicDiagramClass to a specific position
        /// </summary>
        /// <param name="schemDiagramClass">The SchematicDiagramClass on which the schematic rule must be moved</param>
        /// <param name="OrderNumber">Position of the new SchematicBuilderRule</param>
        /// <param name="schemBuilderRule">The moved SchematicBuilderRule</param>
        public void MoveSchematicBuilderRuleToDiagramClassByName(ESRI.ArcGIS.Schematic.ISchematicDiagramClass schemDiagramClass, int OrderNumber, ESRI.ArcGIS.Schematic.ISchematicBuilderRule schemBuilderRule)
        {
                // cast SchematicDiagramClass into ISchematicBuilderRuleContainerEdit
                ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainerEdit schBuilderRuleEditCont=(ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainerEdit)schemDiagramClass;

                schBuilderRuleEditCont.MoveSchematicBuilderRule(schemBuilderRule, OrderNumber);
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Move a SchematicBuilderRule on a SchematicDiagramClass to a specific position
        ''' </summary>
        ''' <param name="schemDiagramClass">The SchematicDiagramClass on which the schematic rule must be moved</param>
        ''' <param name="OrderNumber">Position of the new SchematicBuilderRule</param>
        ''' <param name="schemBuilderRule">The moved SchematicBuilderRule</param>
        Public Sub MoveSchematicBuilderRuleToDiagramClassByName(ByVal schemDiagramClass As ESRI.ArcGIS.Schematic.ISchematicDiagramClass, ByVal OrderNumber As Integer, ByVal schemBuilderRule As ESRI.ArcGIS.Schematic.ISchematicBuilderRule)

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

                schBuilderRuleEditCont.MoveSchematicBuilderRule(schemBuilderRule, OrderNumber)
        End Sub

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