I really thought that I knew how to set and use variables but, for the life of me, I can’t figure out what appears to be a simple issue.
I have defined a variable dynamic FirstLoop. I do not assign any value to this in my definition statement as I have been warned that webCoRE will assign this value to the variable every time the piston runs, effectively overwriting any value that was assigned in the previous loop of the piston.
Then I do an X2 Set variable {FirstLoop} = Yes. Note that there are no quotes around the “Yes” but that is how webCoRE sets it up.
Then do an IF {FirstLoop} is ‘Yes’ Then … Note that there are single quotes around the “Yes” added by webCoRE.
The IF always shows False and the local variable FirstLoop always shows as blank. Somehow I must not be setting the variable properly and any logic that depends on that variable after that does not execute. I have attached a screen shot of part of the piston below. Any thoughts? Thanks.