Jump to content

WinDoor ID/ Data Tags


Recommended Posts

Hi Everyone,

 

Former ArchiCAD user new to the Vectorworks Environment.

 

Trying to create a data tag that when the obscured glazing is ticked in the OIP instead of returning a 'true' or 'false' in the tag it returns either 'OBS' or ' '.

 

Is this a simple add on string to the Tag Field Definition or is this a case of a something simple needing a very complicated workaround.

 

WinDoorIDtag2.png.952e20428b486e5312541f2b318d20b5.png

 

WinDoorIDtag3.png.73f12057889e9739f78c05fff91c499c.png

 

WinDoorIDtag1.png.2c97f2affcca5d8828ec1bced671074a.png

Link to comment

image.png.0d6065263486007bbb13332559033896.png

 

This is a perfect case for the Data Tag version of If/Then, also referred to the trinary operator.

 

Put the result if true before an @ sign and the result if false after a colon (:) and put the test value in the middle.

 

So something like:

 

'OBS'@#WinDoor 6.0#.#Opaque Glass#:''

 

Since 'Opaque Glass' as a field is already defined as a Boolean (true/false) you don't need to do any type of comparison, you can just use the value.

 

The part after the colon is two single quotes next to each other.

 

Note that you can't put any spaces between the @ and the Colon and whatever comes before and after them.

  • Like 2
Link to comment

Thanks @M5d

 

Screenshot2024-03-26at07_22_20.png.aabeabf691db2dd4a1c3c670fbddce8d.pngis how I would have done it. I didn't realise you could also do it the other way e.g. Screenshot2024-03-26at07_22_28.png.69c5f5736668e69ea11d4489ba5d71d9.png. There is no reference to the alternative syntax in the WS Function Reference. So is it only applicable in Data Tags...??

Link to comment
2 hours ago, Pat Stanford said:

This is a perfect case for the Data Tag version of If/Then

Thanks Guys,

 

I'll be honest coming from ArchiCAD were everything is spoon fed to you this is some complex language to get around. But I can definitely see massive potential in this level of flexibility. 

 

Link to comment

Slight Issue... Tag appears to work... However... It has appeared to Turn off the WinDoor tools capability to toggle the 'opaque' option. It thinks for a second and then switches the option off again straight away. Is this because it thinks the code is telling it to be opaque instead of just reading the value?

Link to comment
27 minutes ago, CJA said:

Slight Issue... Tag appears to work... However... It has appeared to Turn off the WinDoor tools capability to toggle the 'opaque' option. It thinks for a second and then switches the option off again straight away. Is this because it thinks the code is telling it to be opaque instead of just reading the value?

 

The only way I can replicate this is if I have 'Link to calculated/user-entered field' enabled in the 'Define Tag Field' dialog. Does this apply in your case? If so, uncheck it. You don't want that to be checked. Otherwise it works fine at this end...

Link to comment
1 minute ago, CJA said:

Yes! Thank you that's worked. Thanks for the Tip Tom W.

 

I will now read up on what that field does.

 

Thanks again.

Screenshot 2024-03-26 170241.png

 

Cool. What 'Link to calculated/user-entered field' does is transfer all of the text in the Current Tag Field Definition (or User-entered field) to a chosen data destination. So for example your Current Tag Field Definition might have multiple data sources which return the make, model number + manufacturer of an object + all of these could be combined into a single text value transferred to the ‘Description’ field of that object.

  • Like 2
Link to comment
9 hours ago, Pat Stanford said:

I probably would have used the @WS_IF

So Pat, If I learn the worksheet functions I'll be able to use them in the data tag tool ( as long as I use the right prefix & suffix) and I'm taking it other tools as well where there is input for dynamic text.

Link to comment

I know that worksheet functions work in Data Tags when surrounded like:

 

#WS_SomeWorksheetFunction(XXXXX)#

 

It can be more complicated than a single function so you can get two values and multiply them and return the value as a string or something similar. Or use nested IF functions if necessary.  But between the #WS_ and the ending # all of the "terminology" must be worksheet terminalogy only.  You can't mix Data Tag functions into the middle of a worksheet function.  So you would have to use 'Record'.'Field' and not #'Record'#.#'Field'#

 

I believe that WS functions can be used in other dynamic text locations as well, but they may be much less useful.  The 1:1 relationship between a Data Tag and an object in the drawing basically acts the same as the 1:1 relationship in a Worksheet Database Subrow. This means that you can access the data associated with that specific object. Other object types that use Dynamic Text probably don't have the 1:1 relationship with an object so many of the WS functions will not operate properly.

 

But that last paragraph is almost entirely a guess on my part. Or at least I can't remember the results of any tests I have run to prove it right or wrong.

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
Reply to this topic...

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