Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Query Methods
When you are using IfElse statements in a Shape Script, the condition is usually that the object has a certain tag or property, and possibly if that tag or property has a particular value. You can set up the conditional statement to check for the property and value using one of the two query methods described below.
Queries
Method |
Description |
See also |
---|---|---|
boolean HasTag( |
Evaluates to true if the associated element has a tag with the name tagname. If the second parameter tagvalue is provided, the tag tagname must be present, and the value of the tag has to be equal to tagvalue for the method to evaluate to true.
|
|
boolean HasProperty( |
Evaluates to true if the associated element has a property with the name propertyname. If the second parameter propertyvalue is provided, the property must be present, and the value of the property has to be equal to propertyvalue for the method to evaluate to true.
|
Learn more