Jump to content
  • 0

VW 2022 Data Tag Substring or count function?




are there any possibilities to implement a substring and a count function in a VW 2022 Data Tag? Both are worksheet functions, however I didn't find them both in the data tag functions. (I suppose, because the "data tag" Plugin doesn't support them there) typing a substring command manually still didn't work.

Link to comment

4 answers to this question

Recommended Posts

  • 0
  • Vectorworks, Inc Employee

Hello @matteoluigi,


You can manually type in the worksheet functions that you want to use between #WS_ # , but these will work only for the provided parameters. This means that you cannot use a substring on something the data tag returns, but you have to explicitly provide this to the worksheet function.


What exactly are you trying to achieve? If you can share a test file I can test and see if it is possible or not.


Best Regards,

Nikolay Zhelyazkov

  • Like 1
Link to comment
  • 0

Well, the Substring thing in fact wasn't my main Idea, however it was worth a try... And, I made it work 🙂

#WS_TEILSTRING('Space'.'11_Occupancy Type'; '_'; 2)# (TEILSTRING is the German command for SUBSTRING 😉 )


my next try is a little bit more advanced, and @Antonio Landsberger from ComputerWorks Germany already told me, that it won't work, and he already placed an Enhancement/Improvement Request (in Jira or somehwere else..., dunno)


I want a Data Tag which counts the number of Space Objects with the same Flat/Apartment ID.

So  I know, how many rooms a flat/apartment does have and how many square meters. I already did sth similar with a vectorscript and python script but, running that script takes about 4-10 Minutes, every time (of course dependent of the project size). So I thought solving sth like this with a Data Tag could be a smart way...

(in fact I would have to count the number of rooms, which are either a living, sleeping or working room, but that's more a question of an if query 😉 )

However, it's just another aproach, also for getting more and more familiar with the new data tag tool...


(I tried counting Spaces with "#WS_ANZAHL('Space'.'11_Occupancy Type')#"  (Anzahl of course is the command for counting objects.) 


Thanks in advance.


Data Tag tests.zip

Edited by matteoluigi
Link to comment
  • 0
  • Vectorworks, Inc Employee

Hello @matteoluigi,


Yes, it is correct that you cannot do such thing with the data tag. This is because the data tag can give you information about the object it tags and not all of the objects in the drawing. You can use worksheets to get such information and put them on the drawing as shown in the attached file.


Best Regards,

Nikolay ZhelyazkovData Tag tests.vwx

Link to comment
  • 0
6 minutes ago, Nikolay Zhelyazkov said:

You can use worksheets to get such information and put them on the drawing as shown in the attached file.

yes, but worksheets actually can't solve what I want to do.

I want to count how many apartments of which entire netto size and of which room number I have.

I still didn't find, how to solve that in a worksheet without some "customizations" (Scripts)


At all, a worksheet can count how many rooms every aparmtent has and how many square meters it has, too.


If I want to count how many aparments of which type a bulding contains, I still have to re refer on space objects. So, writing the room number in a space object, for example with a data tag could be the solution. So, the only reason for that limitation imho could be a performance issue.

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