Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Unified Engineering

Rule execution Programmable Macro Language interface

Rule execution Programmable Macro Language interface

  • Last UpdatedOct 15, 2026
  • 3 minute read

You can use different methods in NetRulesEngine depending on whether a rule set reference is available by way of the RLSREF attribute. For more information, see Rule Set Reference.

The following methods in NetRulesEngine are suitable to use if a Rule Set Reference is available:

Name

Parameters

Result

Purpose

ExecuteAllRules ( STRING )

STRING component: name or ref of component with rules available by way of RLSREF.

Finds rules by way of the RLSREF attribute of the component. For more information, see Rule Set Reference.

If a rule set is found, rules with purpose ATTR, DESP, SPRE, or WDTR are run, and their result values set on the component.

ExecuteAllRules ( STRING, ARRAY, ARRAY )

STRING component: name or ref of component with rules available by way of RLSREF.

STRING ARRAY ruleParKeys: Array of keys for the RULPAR attribute.

BOOL ARRAY ruleParVals: Array of Boolean values for the RULPAR attribute.

Finds rules by way of the RLSREF attribute of the component. For more information, see Rule Set Reference.

If a rule set is found, rules with purpose ATTR, DESP, SPRE, or WDTR are run, and their result values set on the component.

This method also accepts two arrays to act as keys and values for the RULPAR attribute. Only valid if the passed component has the RULPAR attribute. For example, on a fixing, the RULPAR attribute keeps track of which design parameters have been set by rules, to prevent manually set values being overridden.

GetAllRules ( STRING )

STRING component: name or ref of component with rules available by way of RLSREF.

STRING ARRAY

Finds all rules available by way of the RLSREF attribute, and returns a string array of references to these rules.

EvaluateActualComponentValue ( STRING, STRING )

STRING component: name or ref of component.

STRING rule: name or ref of Design Rule (DRULE) element.

STRING

Suitable for ATTR rules only. Evaluates the value of the attribute indicated by the RULATT attribute for this component.

The following methods are suitable for Special Case Rules, where no rule set reference is available:

Name

Parameters

Result

Purpose

EvaluateRule ( STRING, STRING )

STRING component: name or ref of component.

STRING rule: name or ref of DRULE element.

STRING

Evaluates a rule with respect to the given component. The rule is manually specified, rather than located by way of RLSREF.

Returns a string of the evaluated value. This method does not make database changes, the result should be interpreted by the calling code.

If no result is found, returns an empty string.

EvaluateRule ( STRING, STRING, ARRAY, ARRAY )

STRING component: name or ref of component.

STRING rule: name or ref of DRULE element.

STRING ARRAY expKeys: Array of keys to replace in any expressions within the rule.

STRING ARRAY expVals: Array of values to use to replace the keys in any expressions within the rule.

STRING

Evaluates a rule with respect to the given component. The rule is manually specified, rather than located by way of RLSREF.

Returns a string of the evaluated value. This method does not make database changes, the result should be interpreted by the calling code

If no result is found, returns an empty string.

This method also accepts two arrays of strings, which, together, are used as key-value pairs to replace parts of the rule expressions.

Before evaluating any expression, the Rules Engine searches the string expression for any substring in the Keys array. If the substring key is found, it is replaced in the expression with the value.

FunctionsEnabled ( BOOL )

BOOL enabled

Enables or Disables execution of Programmable Macro Language (PML) functions or sub-rules within rule values when the rule is executed by EvaluateRule.

If disabled, the PML function or sub-rule is returned as a string.

The default value is TRUE.

LoggingEnabled ( BOOL )

BOOL enabled

Enables or Disables logging of executed expressions when the rule is executed by EvaluateRule.

Access the log by way of the GetLog method.

The default value is FALSE.

GetLog ( )

STRING ARRAY

Array of strings representing the expressions executed by the last run rule from EvaluateRule.

Only available if LoggingEnabled is set to TRUE when the rule is run.

Related Links