David Poiron Posted December 8, 2022 Share Posted December 8, 2022 Sorry if this topic is in the wrong place but it might relate to data tags too so here goes: I'm trying to parse out words that are part of a symbol name for a graphic legend field (text). The symbol name is made up of a reference (ex.L12) and a description (ex. recessed lighting), for an overall name of 'L12 recessed lighting'. I thought it might be possible to use the worksheet SubString function to, for example, get the first word - #WS_SUBSTRING(#SYMBOL#, ' ', 1)#, but this does not work. Can anyone help with this task - or maybe it is not possible? Quote Link to comment
Vectorworks, Inc Employee Nikolay Zhelyazkov Posted December 12, 2022 Vectorworks, Inc Employee Share Posted December 12, 2022 Hello @David Poiron, Can you share a sample file showing how this is set up? Thanks, Nikolay Zhelyazkov Quote Link to comment
Pat Stanford Posted December 12, 2022 Share Posted December 12, 2022 I don't think you can mix and match the DataTag #--# format and the WS_Formula tags that way. I have found that if you use a #WS_ function, then everything inside the WS function must be exactly the same as you would use in a worksheet. So using just SymbolName instead of #Symbol# inside the #WS_Substring function will give you what you want. This tag uses the #DataTag# functions to return the complete symbol name on the first line and then uses the #WS functions to return just the part to the left of the first space on the second line. 1 Quote Link to comment
David Poiron Posted December 12, 2022 Author Share Posted December 12, 2022 Pat, This is the answer I was looking for - worked like a charm. Thanks as usual for your help! (Thanks Nikolay for you offer as welll) David. 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.