EA_OnRunParameterRule

Return to Introduction  Previous page  Next page

Syntax

Sub EA_OnRunParameterRule(Repository As EA.Repository, RuleID As String, ParameterGUID As String, MethodGUID As String, ObjectID As Long)

The EA_OnRunMethodRule function syntax contains the following elements:

Parameter

Type

Direction

Description

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.

ParameterGUID

String

IN

The GUID of the Parameter to potentially perform validation on. Use it to retrieve the Parameter by iterating through the Method.Parameters collection.

MethodGUID

String

IN

The GUID of the Method which owns the given Parameter. Use the Repository.GetMethodByGuid method to retrieve the Method object.

ObjectID

Long

IN

The ID of the Object which owns the given Method. Use the Repository.GetObjectByID method to retrieve the Object.

Details

This event is triggered once for each rule defined in EA_OnInitializeUserRules to be performed on each Parameter in the selection being validated. If you don't want to perform the rule defined by RuleID on the given Parameter, 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.

See Also

EA_OnInitializeUserRules