Interface ITopologyRule

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

Provides access to memebers that return information about topology rules.

[Guid("A53B59A5-2EFC-41C4-9769-C0FAA13E62E9")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ITopologyRule

Remarks

The ITopologyRule interface provides access to members which can be used to assign or retrieve information about a topology rule.  Topology rules are cocreateable.

To be added to a topology, a rule must have (at a minimum) its Type and OriginClassID properties defined. Rules which use a destination feature class must also have the DestinationClassID property set.

When specifying the Origin properties, if the OriginSubtype, OriginSubtypeSpecified and AllOriginSubtypes are not specified, the OriginSubtype is set to the default subtype.  If no subtypes are defined on the feature class, the OriginSubtype will equal zero.  The same is true for the DestinationSubtype, DestinationSubtypeSpecified and AllDestinationSubtypes properties.

[C#]

// Create a rule

ITopologyRule topologyRule = new TopologyRuleClass()

{

    AllOriginSubtypes = true,

    TopologyRuleType = esriTopologyRuleType.esriTRTAreaNoOverlap,

    Name = "No Overlap Rule",

    TriggerErrorEvents = true

};

Properties

AllDestinationSubtypes

Indicates if all destination subtypes are specified for the topology rule.

bool AllDestinationSubtypes { get; set; }

Property Value

bool

Remarks

AllDestinationSubtypes specifies if the rule applies to all subtypes in the destination feature class. By default, AllDestinationSubtypes is False, and the DestinationSubtype property is set to -1. If the destination class contains subtypes, and these values are not changed, adding the rule to the topology will fail.

AllDestinationSubtypes is set to the opposite value of DestinationSubtypeSpecified. If the topology rule is a single feature class type, AllDestinationSubtypes is set to True once the rule is added to the topology.

AllOriginSubtypes

Indicates if all origin subtypes are specified for the topology rule.

bool AllOriginSubtypes { get; set; }

Property Value

bool

Remarks

AllOriginSubtypes specifies if the rule applies to all subtypes in the origin feature class. By default, AllOriginSubtypes is False, and the OriginSubtype property is set to -1. If the origin class contains subtypes, and these values are not changed, adding the rule to the topology will fail.

AllOriginSubtypes is set to the opposite value of OriginSubtypeSpecified. If the topology rule is a single feature class type, AllOriginSubtypes is set to True once the rule is added to the topology.

DestinationClassID

Destination ClassID of the topology rule.

int DestinationClassID { get; set; }

Property Value

int

Remarks

The DestinationClassID of the topology rule.  If the topology rule is a single feature class type, the DestinationClassID does not need to be set, and it will be equal to the OriginClassID by default. If DestinationClassID is specified, it will be ignored.

DestinationSubtype

Destination subtype of the topology rule.

int DestinationSubtype { get; set; }

Property Value

int

Remarks

The DestinationSubtype specifies the destination subtype of the topology rule.  If AllDestinationSubtypes is set to True, the DestinationSubtype is ignored. If DestinationSubtype is set to -1, AllDestinationSubtypes will return True.  If the assigned value does not correspond to a valid subtype, an error will be raised when the rule is added to the topology.

DestinationSubtypeSpecified

Indicates if a destination subtype has been specified.

bool DestinationSubtypeSpecified { get; }

Property Value

bool

Remarks

The DestinationSubtypeSpecified will return True whenever the rule has been specified at the subtype level using ITopologyRule::DestinationSubtype. The DestinationSubtypeSpecified is the opposite of ITopologyRule::AllDestinationSubtypes.

GUID

GUID of the topology rule.

string GUID { get; }

Property Value

string

Remarks

A GUID uniquely identifies each topology rule, and it is assigned when the rule is added to the topology using ITopologyRuleContainer::AddRule. The GUID is also used to get the topology rule using ITopologyRuleContainer::RulebyGUID.

Name

Name of the topology rule.

string Name { get; set; }

Property Value

string

Remarks

The Name property can be used to assign a user-specified string to each rule. By default, the Name property is empty.

OriginClassID

Origin ClassID of the topology rule.

int OriginClassID { get; set; }

Property Value

int

Remarks

The OriginClassID of the topology rule.

OriginSubtype

Origin subtype of the topology rule.

int OriginSubtype { get; set; }

Property Value

int

Remarks

The origin subtype of a topology rule. If AllOriginSubtypes is set to True, the OriginSubtype is ignored. If OriginSubtype is set to -1, AllOriginSubtypes will return True. If the assigned value does not correspond to a valid subtype, an error will be raised when the rule is added to the topology.

OriginSubtypeSpecified

Indicates if an origin subtype has been specified.

bool OriginSubtypeSpecified { get; }

Property Value

bool

Remarks

The ITopologyRule::OriginSubtypeSpecified property will return True whenever the rule has been specified at the subtype level with the use of ITopologyRule::OriginSubtype. The OriginSubtypeSpecified is the opposite of ITopologyRule::AllOriginSubtypes.

TopologyRuleType

Topology rule type of the topology rule.

esriTopologyRuleType TopologyRuleType { get; set; }

Property Value

esriTopologyRuleType

Remarks

A value from the esriTopologyRuleType enumeration that represents the rule's type.

TriggerErrorEvents

Indicates if error events are triggered for the topology rule.

bool TriggerErrorEvents { get; set; }

Property Value

bool

Remarks

The TriggerErrorEvents property is not currently in use and is reserved for future use.

Methods

ErrorShapeTypes(out bool, out bool, out bool)

Indicates the shape types of errors for the topology rule.

void ErrorShapeTypes(out bool multipoints, out bool polylines, out bool polygons)

Parameters

multipoints bool
polylines bool
polygons bool

Remarks

The ErrorShapeTypes method returns the supported error geometries for the specific topology rule. If a topology rule does not support multi-points, this parameter equates to points. Every topology rule supports the creation of point topology errors.