This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Get The Number Of Schematic Rules Configured On A SchematicDiagramClass Snippet (ArcObjects .NET 10.4 SDK) |
Get the number of schematic rules configured on a SchematicDiagramClass
/// <summary> /// Get the number of schematic rules configured on a SchematicDiagramClass /// </summary> /// <param name="schemDiagramClass">The SchematicDiagramClass where the schematic rules are configured</param> /// <returns>The number of rules [Integer]</returns> public int CountSchematicBuilderRulesFromDiagramClassByName(ESRI.ArcGIS.Schematic.ISchematicDiagramClass schemDiagramClass) { // cast SchematicDiagramClass into ISchematicBuilderRuleContainer ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainer schBuilderRuleCont=(ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainer)schemDiagramClass; return schBuilderRuleCont.SchematicBuilderRuleCount; }
''' <summary> ''' Get the number of schematic rules configured on a SchematicDiagramClass ''' </summary> ''' <param name="schemDiagramClass">The SchematicDiagramClass where the schematic rules are configured</param> ''' <returns>The number of rules [Integer]</returns> Public Function CountSchematicBuilderRulesFromDiagramClassByName(ByVal schemDiagramClass As ESRI.ArcGIS.Schematic.ISchematicDiagramClass) As Integer ' cast SchematicDiagramClass into ISchematicBuilderRuleContainer Dim schBuilderRuleCont As ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainer=TryCast(schemDiagramClass, ESRI.ArcGIS.Schematic.ISchematicBuilderRuleContainer) Return schBuilderRuleCont.SchematicBuilderRuleCount End Function