IAttributeRule Interface

Provides access to members that return, modify and validate attribute rules.

Description

IAttributeRule interface is used to maintain information about attribute rules. Validation of attribute rules is a function of this interface. Setting/retrieving the domain name, fieldname, subtypecode of a particular attribute rule are members of this interface.

When To Use

IAttributeRule is the interface on a AttributeRule object used to get and set the properties of an Attribute Rule. You can use the Validate function of the attribute rule object to validate a particular row against this attribute rule. The validate function returns a boolean value of TRUE if it is valid and FALSE if it was not.

Members

Name Description
Read/write property Category The name associated with the validation rule.
Read/write property DomainName The domain name associated with the attribute rule.
Read/write property FieldName The field name associated with the attribute rule.
Read/write property Helpstring The helpstring associated with the validation rule.
Read/write property ID The ID of the validation rule.
Read/write property SubtypeCode The subtype code.
Read-only property Type The type associated with the validation rule.
Method Validate Validates the rule.

IAttributeRule.DomainName Property

The domain name associated with the attribute rule.

Public Property DomainName As String
public string DomainName {get; set;}

Description

DomainName property returns the DomainName of the given Attribute rule.

IAttributeRule.FieldName Property

The field name associated with the attribute rule.

Public Property FieldName As String
public string FieldName {get; set;}

Description

FieldNameproperty returns the field name of the given attribute rule.

IAttributeRule.SubtypeCode Property

The subtype code.

Public Property SubtypeCode As Integer
public int SubtypeCode {get; set;}

Description

SubtypeCode property retrieves the subtypecode that this rule will apply to.

IAttributeRule.Validate Method

Validates the rule.

Public Function Validate ( _
    ByVal Row As IRow, _
    ByRef ErrorMessage As String _
) As Boolean
public bool Validate (
    IRow Row,
    ref string ErrorMessage
);

Description

Validate function validates a row against this attribute rule, placing an error message if any is generated in the error message string parameter. Returns a boolean TRUE if row is valid and FALSE if not.

Inherited Interfaces

Interfaces Description
IRule Provides access to members that return information about rules.

Classes that implement IAttributeRule

Classes Description
AttributeRule Esri attribute rule object.

Remarks

IAttributeRule is for setting rules based on attributes for object classes. They describe the legal values for a field in an object class. For example, you might set an attribute rule that specifies wood poles can only be within a certain height range. You do this by establishing a range domain for pole heights and then using an attribute rule to apply this domain to a particular field in the pole object class, probably the height field.

``

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.