Tag binding with expressions

#1

Hi,

For UDT tags bind with expressions. From the user manual, I saw it only support one expression bind such as “if” or “switch”. It seems that all judgement or conditions shall be implemented in a single sentence.

So how could we implement more than one expressions judgement for a tags bind like a C or python function call?

0 Likes

#2

Take a look at runScript. Also note you can nest expressions to achieve fairly complex logic, though this is usually more readable on complex logic if you break it up into expressions on custom properties that are then used in the final expression.

0 Likes

#3

@witman
Thanks for your help.
In fact, I created a lot of custom properties as a workaround for the one sentence limitation in expression.
I will try to use runScript as you suggested.

0 Likes

#4

Note that expressions can have line breaks at any operator or parenthesis. Organizing nested expressions on multiple lines with some indenting can mitigate the apparent complexity.

2 Likes