Jump to content

landscape area section?


Recommended Posts

  • 2 months later...
  • 3 weeks later...
  • 4 weeks later...

@Zsombor@Anders Blomberg

Good news,

You can enter conditional statements into data tags. The element you were concerned about was values being shown when they were zero.

See Screenshot below

image.png.8c64bd4f7023c58fbc23c4680b9c0b4c.png

Note there are only 7 layers attached.

 

Component Description - From outside to inside :

#WS_IFNA((OBJECTDATA('component', 'thickness', 1)), ' ')# #fi_3_2# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 1)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 1)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 2)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 2)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 2)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 3)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 3)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 3)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 4)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 4)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 4)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 5)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 5)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 5)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 6)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 6)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 6)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 7)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 7)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 7)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 8)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 8)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 8)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 9)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 9)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 9)#
#WS_IFNA((OBJECTDATA('component', 'thickness', 10)), ' ')# #WS_IF(VALUE(OBJECTDATA('component', 'thickness', 10)>0), 'in thick -', ' ')#   #WS_OBJECTDATA('component', 'name', 10)#

 

I'm still working on a tidier method however. Since there are conditional statements, its possible to make this a much more elegant solution!

 

@Nikolay Zhelyazkov

 

I was wondering regarding the information above -

 

1. Is there a function to call out component index ? i.e. 1, 2, 3, 4, etc...

 

I have looked through all the variables in the insert function context menu in the worksheets, but have not found anything.

 

2. Is there a way to display the dimensional information of values to fractional inches or feet rather than decimal inches / feet in the datatag layout

I tried to use  #fi_3_2#, but it doesn't work. Is there something that I'm missing?

 

Thank you in advance!

Edited by Samuel Derenboim
  • Like 1
Link to comment
  • Vectorworks, Inc Employee
5 hours ago, Samuel Derenboim said:

1. Is there a function to call out component index ? i.e. 1, 2, 3, 4, etc...

- Can you give me some more info about this? As far as I understand you want to get the component index, but based on what? For example, you might have the name and want to take the index. Is this the case? Anyway, I do not think that there is a function that returns a component index.

 

5 hours ago, Samuel Derenboim said:

2. Is there a way to display the dimensional information of values to fractional inches or feet rather than decimal inches / feet in the datatag layout

I tried to use  #fi_3_2#, but it doesn't work. Is there something that I'm missing?

- If you use the data tag if syntax, which is like this - <TrueValue>@<TestValue>:<FalseValue>, or 'Positive'@X>0:'Negative' and the worksheet functions for component thickness you can get something like this which I think gets the job done:

 

#WS_COMPONENTTHICKNESS(2)##fi_14_2#@#WS_COMPONENTTHICKNESS(2)#>0:' ' 'in thick -'@#WS_COMPONENTTHICKNESS(2)#>0:' '

 

Let me know if this helps.

 

Best Regards,

Nikolay Zhelyazkov

  • Like 1
Link to comment

@Samuel Derenboim Great stuff! Thanks for letting us know. I will try this out as soon as I get a chance. Currently I'm transitioning these types of drawings to the new Graphic Legend tool, looks to be one of the really great features of 2023. As the tool still uses the same way to fetch data it would be hugely helpful if I could make this work as you describe. I actually picked up a Python course just to try and learn how to do this as I figured an IF statement might work but never understood how 🙂

Link to comment

@Nikolay Zhelyazkov

 

🤯🤯🤯🤯🤯🤯🤯🤯

 

Mind = Blown

I've never seen a conditional statement like that before in any of the data tags. Is this something new? Is this the only datatag conditional statement format? Just curious if I can read up more on the properties of these conditional statements. There is something to note however, the number is displayed as fractional feet, but the unit of measurement is inches. I have to actually multiply the value by 12 in order to get the correct dimension.  Like so below :

 

#WS_COMPONENTTHICKNESS(5)##fi_14_2#*12@#WS_COMPONENTTHICKNESS(5)#>0:' ' thick @#WS_COMPONENTTHICKNESS(5)#>0:' '

 

Why does it display 1/12 of the dimension? Is it because of units in the document? I've changed the units, still doesn't seem to change the value though. I don't mind multiplying by 12, just curious why it does this.

 

Also, I have created a prototype graphic legend that intended to do the same thing, however, it doesn't work the same as it does for the datatag. One of the things that happens is that after the 1st line in the description, dimensional information reverts back to decimal and displays foot information rather than ft/in information.

I know it sounds confusing. Attaching the file here.

 

Nikolay, Thank you in advance! You're a tremendous help!!!

 

 

DATATAG COMPONENT CALLOUTS.vwx

Edited by Samuel Derenboim
  • Like 1
Link to comment
  • Vectorworks, Inc Employee
14 hours ago, Samuel Derenboim said:

Mind = Blown

I've never seen a conditional statement like that before in any of the data tags. Is this something new? Is this the only datatag conditional statement format? Just curious if I can read up more on the properties of these conditional statements.

- The if syntax in the data tag is not new, but I cannot tell for sure when it was first introduced. I do not think that there are any other conditional statements in the data tag.

 

14 hours ago, Samuel Derenboim said:

There is something to note however, the number is displayed as fractional feet, but the unit of measurement is inches. I have to actually multiply the value by 12 in order to get the correct dimension.  Like so below :

 

#WS_COMPONENTTHICKNESS(5)##fi_14_2#*12@#WS_COMPONENTTHICKNESS(5)#>0:' ' thick @#WS_COMPONENTTHICKNESS(5)#>0:' '

 

Why does it display 1/12 of the dimension? Is it because of units in the document? I've changed the units, still doesn't seem to change the value though. I don't mind multiplying by 12, just curious why it does this.

- I have tested this a bit more and I get the same result if I display the thickness as fractions in a worksheet and in the data tag, so I am not really sure what the expected result is. Make sure to check out all the fraction display options in the data tag, which are available for document units, if they are feet&inches, and for feet&inches as shown in the image below:

 

image.png

 

Follow up: In your file, removing the *12 from the tag formula and setting the document units to feet seems to get the same results.

 

14 hours ago, Samuel Derenboim said:

Also, I have created a prototype graphic legend that intended to do the same thing, however, it doesn't work the same as it does for the datatag. One of the things that happens is that after the 1st line in the description, dimensional information reverts back to decimal and displays foot information rather than ft/in information.

I know it sounds confusing. Attaching the file here.

- Did some more experiments here too, seems like the dimensions, both in graphic legends and standalone, take the units of the document. So setting the document units to Feet&Inches, rounding by fractions always and setting the fractional precision to 1/16 gets the same result in the graphic legends as in the data tag from your file. Note, that this breaks the current data tag and makes it require *12 again.

 

Best Regards,

Nikolay Zhelyazkov

  • Like 1
Link to comment

@Nikolay Zhelyazkov

Thank you! I'll double check the settings shortly.

 

Pardon that I have so many questions but this is quite new to me.

 

I did also want to ask

 

1. Is it possible to get the graphic scale of the image inside the graphic legend? I.e. if graphic legend image scale is at 1.5in =1ft, Is it possible to display it in the legend dataset ( I found it as a resource in the tag reference, but don't know how to call it out in #ws_objectdata# or #graphiclegend# / graphic legend image )

 

2. Is it possible to 'count' every instance of the graphic legend in sequence? (I.e. if there are 16 details, each has a number for reference)

I've been playing around with the database sequence settings, but I don't think it knows how to count every instance...perhaps there is a trigger?

 

Thanks so much!

 

Best

Samuel

Edited by Samuel Derenboim
Link to comment
  • Vectorworks, Inc Employee

Hello @Samuel Derenboim,

 

I did some more testing on this and here is what I found:

21 hours ago, Samuel Derenboim said:

There is something to note however, the number is displayed as fractional feet, but the unit of measurement is inches. I have to actually multiply the value by 12 in order to get the correct dimension.

- This is a bug when the document is in Feet&Inches units only and worksheets have this bug too. I have reported it and it will be looked into.

 

21 hours ago, Samuel Derenboim said:

Also, I have created a prototype graphic legend that intended to do the same thing, however, it doesn't work the same as it does for the datatag. One of the things that happens is that after the 1st line in the description, dimensional information reverts back to decimal and displays foot information rather than ft/in information.

I know it sounds confusing. Attaching the file here.

- This is a bug with the graphic legend and I have reported it too.

 

2 hours ago, Samuel Derenboim said:

Is it possible to get the graphic scale of the image inside the graphic legend? I.e. if graphic legend image scale is at 1.5in =1ft, Is it possible to display it in the legend dataset ( I found it as a resource in the tag reference, but don't know how to call it out in #ws_objectdata# or #graphiclegend# / graphic legend image

- I did not find a way to display this, so it might be impossible at this time. You can always request it in the wishlist section.

 

2 hours ago, Samuel Derenboim said:

Is it possible to 'count' every instance of the graphic legend in sequence? (I.e. if there are 16 details, each has a number for reference)

I've been playing around with the database sequence settings, but I don't think it knows how to count every instance...perhaps there is a trigger

- Same as the above, I am afraid that this is currently not possible. Please add a wishlist item for it if you want to.

 

Best Regards,

Nikolay Zhelyazkov

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