Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

EA_OnRunAttributeRule

Topics

Topic

Detail

See also

Details

This event is triggered once for each rule defined in EA_OnInitializeUserRules to be performed on each attribute in the selection being validated.

If you don't want to perform the rule defined by RuleID on the given attribute, then simply return without performing any action.

On performing any validation, if a validation error is found, use the Repository.ProjectInterface.PublishResult method to notify Enterprise Architect.

 

EA_OnInitializeUserRules

Syntax:

Sub EA_OnRunAttributeRule(Repository As EA.Repository, RuleID As String, AttributeGUID As String, ObjectID As Long)

The EA_OnRunAttributeRule function syntax contains the following elements:

Parameter

Type

Direction

Description

AttributeGUID

String

IN

The GUID of the attribute to potentially perform validation on.

Use the Repository.GetAttributeByGuid method to retrieve the attribute object.

 

ObjectID

Long

IN

The ID of the object that owns the given attribute.

Use the Repository.GetElementByID method to retrieve the object.

 

Repository

EA.Repository

IN

An EA.Repository object representing the currently open Enterprise Architect model.

Poll its members to retrieve model data and user interface status information.

 

RuleID

String

IN

The ID that was passed into the Project.DefineRule command.