Jump to content
  • 0

Vectorscript - Command Code in Data tag


matteoluigi

Question

Hi,

I like coding and most of all benefitting from the possibilities of coding additional things.

So I do a little vectorscript, a little Python and of course I insert code in worksheets and the Datamanager.

 

Actually I need some data stamps and I wonder, why there isn't any possibility of inserting there some code, too. Like getting a substring or an if clause. (concat isn't necessary there ^^)

is there any attempt in that direction?

thank you

Edited by matteoluigi
Link to comment

7 answers to this question

Recommended Posts

  • 0
  • Vectorworks, Inc Employee

Hello @matteoluigi,

 

As of VW 2022 you can use worksheet syntax in the data tag if you wrap it around #WS_<worksheet code here>#. Whatever you write here should return the same result as you get from a database row of a worksheet for the tagged object.

 

I think that this is what you were looking for. Let me know if you need any further information.

 

Best Regards,

Nikolay Zhelyazkov

  • Like 1
Link to comment
  • 0
  • Vectorworks, Inc Employee
3 minutes ago, matteoluigi said:

great, and how do I check the filename in there? Like IF(FILENAME='*MA*','MA','NOTMA') ^^

- For this you can use the Data Tag General Function for File Name and then the data tag syntax for IF as described here - https://app-help.vectorworks.net/2022/eng/VW2022_Guide/Annotation2/Creating data_tag_styles.htm#h

Link to comment
  • 0

#FILEN# works well

#WS_Substring(#FILEN#;'_';3)# instead doesn't. The result is "FILEN".

I guess I need to chose a worksheet function for the filename, but I don't find any

 

(only Title Block related ones, but those don't work either, because a window isn't related to the database informations from the title block)

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