Jump to content
  • 0

Data Tag Logical IF


Eliot Hartzler

Question

When playing with data tags recently, I came across the fact that logical statements can be used in the tag field definition. The Vectorworks Help gives two syntax examples for a logical IF statement:

76630789_VWHelpArticle.thumb.png.da6270f035227e3a88dfc1d7362a6676.png

VW2021 Help - Data Tag Page

 

I can't seem to make the first syntax work. I have two circles that are exactly the same (with a record attached that has an INT "Number" field), and have replicated the first syntax in the top data tag and the second syntax in the bottom tag:

1329552565_SimpleExample.thumb.png.1b3691f16f3cbc95f0a27ede47491034.png

The first syntax is a little more intuitive (for me, at least) which is why I'd like to use it, but if it isn't a valid statement I'll go with the second syntax. I did try removing the single quotes from around the numbers, figuring this might change the variables to INTs instead of strings, but to no avail...Can anyone replicate this? Is this syntax invalid?

Link to comment

1 answer to this question

Recommended Posts

  • 0

I could not make the IF format work either, but with a record names PTS the following worked.

 

"TWO"@#PTS#.#INT2#="2":"Not TWO")

 

The value is true is before the @ surrounded by double quotes.

The condition is between the @ and the : (colon)

The value if false is after the : (colon)

 

No spaces anywhere inside the formula except inside of double quotes (for the true and false conditions or as part of the comparison).

 

Hope this helps.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...