Jump to content
  • 0

Data Tag Logical IF

Eliot Hartzler


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:


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:


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.

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...