markdd Posted December 17, 2022 Share Posted December 17, 2022 (edited) I would like to create a Data Tag that shows an Arrow in 1 of four different directions. I am aware that IF statements are available in Data Tags and so far I have come up with this String that will do what you see in the image below. ⇧@#Lighting Device#.#Pan#<90:⇩ However, I have drawn a blank when it comes to creating ranges of values. For instance I would like an: Up Arrow when Pan angle is between 45 and -45 Left Arrow when Pan angle is between 45 and 135 DOWN Arrow when Pan angle is between 135 and 225 RIGHT Arrow when the Pan angle is between 225 and 315 I have figured out that I will possibly need 4 text blocks in the Data Tag but ulimately it would be great to learn how to create this string with one Text block if possible. Any help with this conundrum would be greatly appreciated. As a sidebar, I have noticed that the Greater than ">" and Less than"<" math symbols seem to be behaving the wrong way around in Data Tags. This is probably my stupidity, but it certainly tripped me up while doing this..... Direction Data Tags.vwx Edited December 17, 2022 by markdd 1 Quote Link to comment
Mark Aceto Posted September 13, 2023 Share Posted September 13, 2023 @markdd I just found this when searching for the exact same functionality... except for a [NDA]. Where did you land with this? Quote Link to comment
markdd Posted September 13, 2023 Author Share Posted September 13, 2023 I eventually came up with a solution that was rather convoluted but did actually work. I’ll do some digging and see if I can find the file. I’m doing very long days at the moment, but I’ll pm you if I find it….. Quote Link to comment
Antonio Landsberger Posted September 15, 2023 Share Posted September 15, 2023 @markdd I know an easy way to do this: Since Vectorworks 2022 you can use worksheet functions within the data tag. In this case I would go with the function IFS, because you have a fix amount of possible conditions paired with their output. It would go like this: #WS_IFS(('Lighting Device'.'Pan'>=-45)&('Lighting Device'.'Pan'<45),'↑',('Lighting Device'.'Pan'>=45)&('Lighting Device'.'Pan'<135),'←',('Lighting Device'.'Pan'>=135)&('Lighting Device'.'Pan'<225),'↓',('Lighting Device'.'Pan'>=225)&('Lighting Device'.'Pan'<=315),'→')# It's always good practice to write the worksheet formula into an actual worksheet first. Once you are happy, you can insert it with this modification #WS_<># into the data tag formula field. I used the first of the available arrow symbols for each direction from here: https://symbl.cc/en/collections/arrow-symbols/ 2 Quote Link to comment
markdd Posted September 15, 2023 Author Share Posted September 15, 2023 33 minutes ago, Antonio Landsberger said: @markdd I know an easy way to do this: Since Vectorworks 2022 you can use worksheet functions within the data tag. In this case I would go with the function IFS, because you have a fix amount of possible conditions paired with their output. It would go like this: #WS_IFS(('Lighting Device'.'Pan'>=-45)&('Lighting Device'.'Pan'<45),'↑',('Lighting Device'.'Pan'>=45)&('Lighting Device'.'Pan'<135),'←',('Lighting Device'.'Pan'>=135)&('Lighting Device'.'Pan'<225),'↓',('Lighting Device'.'Pan'>=225)&('Lighting Device'.'Pan'<=315),'→')# It's always good practice to write the worksheet formula into an actual worksheet first. Once you are happy, you can insert it with this modification #WS_<># into the data tag formula field. I used the first of the available arrow symbols for each direction from here: https://symbl.cc/en/collections/arrow-symbols/ Ha. This is exactly what I eventually came up with! Thanks for taking the time. 1 Quote Link to comment
Recommended Posts
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.