Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Guillaume on September 02, 2022, 08:02:13 pm

Title: MDG - ShapeScript AND/OR operators
Post by: Guillaume on September 02, 2022, 08:02:13 pm
Hello,

Is there a way to combine conditions within an if statement in ShapeScript ?
The following doesn't work so I have to repeat if.. else statements for each condition and duplicate the code.

Code: [Select]
if (HasTag('Type','A') AND HasTag('Type','A'))
{
   // ...
}
Title: Re: MDG - ShapeScript AND/OR operators
Post by: qwerty on September 02, 2022, 08:52:59 pm
AND = nested IF.

OR = repeat the code.

(argh!)

q.