Blog

Get Rule of Geometric Network using arcobject.

Posted by Yogesh Sharma Blogs | ArcObject Nov 06, 2012
Get Rule of Geometric network using arcobject.
GET GEOMETRIC NETWORK RULE USING ARCOBJECT-

 private static void GetRule(IGeometricNetwork pGeonet)
        {
            string ruleType = string.Empty;
            IEnumRule rules = pGeonet.Rules;
            IRule pRule = rules.Next();
            
            

            while (pRule != null)
            {
                esriRuleType pRuleType = pRule.Type;

                if (pRuleType==esriRuleType.esriRTAttribute)
                {
                    IAttributeRule pAttrRule = (IAttributeRule)pRule;
                    
                }
                else if (pRuleType == esriRuleType.esriRTEdgeConnectivity)
                {
                    IEdgeConnectivityRule pEdgeConnRule = (IEdgeConnectivityRule)pRule;
                }
                else if (pRuleType == esriRuleType.esriRTJunctionConnectivity)
                {
                    IJunctionConnectivityRule pJuncConnRule = (IJunctionConnectivityRule)pRule;
                
                }
                else if (pRuleType == esriRuleType.esriRTRelationship)
                {
                    IRelationshipRule pJuncConnRule = (IRelationshipRule)pRule;

                }
                else if (pRuleType == esriRuleType.esriRTTopology)
                {
                    ITopologyRule pTopoRule = (ITopologyRule)pRule; 
                }
                
                ruleType = pRule.Type.ToString();
                pRule = rules.Next();
            }
        }
COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs