Martin Lerch Posted March 22, 2020 Share Posted March 22, 2020 Hello, I'm looking for a possibility to attach data tags to a defined selection of objects, as part of a marionette. What nodes do I need to combine? Thanks for any help! Martin Quote Link to comment
Martin Lerch Posted April 23, 2020 Author Share Posted April 23, 2020 Hi, anybody any thought on this? I'm still trying to attach a data tag to a space object, using marionette... Thanks for any hint! Martin Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted April 28, 2020 Vectorworks, Inc Employee Share Posted April 28, 2020 Hello Martin, There are no default nodes, but there are a few scripting calls that have been added to Vectorscript and Python in 2019. You can find them here. https://developer.vectorworks.net/index.php/VS:Function_Reference#Data_Tag_Interface_Library In order to place a data tag, you could use the Symbol node and then I imagine you could create a custom node that uses the first command, https://developer.vectorworks.net/index.php/VS:DT_AssociateWithObj, to associate it with a Space. I think this would work if you are placing these Data Tags in design layers, but if you are trying to place them in the Annotation Space of a viewport, I would recommend adding Data Tags manually. There is a way to tag all relevant objects at once, so I imagine a script wouldn't bring much added efficiency. Quote Link to comment
jpccrodrigues Posted April 28, 2020 Share Posted April 28, 2020 4 hours ago, sbarrett said: There is a way to tag all relevant objects at once Can you help out on this matter? How can I do it? Thanks!!! Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted April 28, 2020 Vectorworks, Inc Employee Share Posted April 28, 2020 You can do this by choosing "Select Eligible Objects Mode" in the Mode bar of the Data Tag tool. If your tag is set to read a field from the Space object, you can hover over a Space with that Data Tag style selected and all spaces will highlight red. This works with any object type that the Data Tag is looking for. I took a screenshot of it using Doors and a Door-specific tag. Quote Link to comment
jpccrodrigues Posted April 29, 2020 Share Posted April 29, 2020 Thanks, that helps a lot in my planting schemes!!! Quote Link to comment
Martin Lerch Posted May 3, 2020 Author Share Posted May 3, 2020 On 4/28/2020 at 5:11 PM, sbarrett said: I imagine you could create a custom node that uses the first command, https://developer.vectorworks.net/index.php/VS:DT_AssociateWithObj, to associate it with a Space. This sounds very promising, thank you @sbarrett! Unfortunately I do not have any scripting background and I would need some kind of tutorial on how to translate VS:DT_AssociateWithObj into a node. The syntax changes a bit I guess? Thanks for helping so far! Quote Link to comment
Martin Lerch Posted May 3, 2020 Author Share Posted May 3, 2020 ... found it out, while 'trial & error' 😆 Though, not sure about the output handle, if it's really necessary - it seems not to work properly. Please feel free to take a look and comment on the scripting, thanks! DT_AssociateWithObj.vwx Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted May 4, 2020 Vectorworks, Inc Employee Share Posted May 4, 2020 Hi @Martin Lerch, I tested it and it appears to work great. The issue that you will have is that any geometry created by a Marionette script will be grouped. after the script is run and you ungroup the data tags, they appear to be associated properly with the space. I would recommend having the data tag also be the output of the script, that way you can manipulate it further along in the script (after it has been associated) if you wish. Quote Link to comment
Martin Lerch Posted May 4, 2020 Author Share Posted May 4, 2020 Thanks for your feedback Sarah! 11 minutes ago, sbarrett said: The issue that you will have is that any geometry created by a Marionette script will be grouped. Yes, I saw that. In my marionette project I place every Data Tag on a different Sheet Layer first and associate it after with the object. It works great so far (and without the grouping problem). 9 minutes ago, sbarrett said: I would recommend having the data tag also be the output of the script That's what I've tried before but without success... how do I have to add this in the node? Thanks a lot, Martin Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted May 4, 2020 Vectorworks, Inc Employee Share Posted May 4, 2020 I have edited the node so that the "result" shows up and the associated data tag is now an output as well. This network will work when running it on a single design layer, but because of how Marionette works (creating groups of objects), placing them on multiple layers at the same time is rather tricky and I don't recommend it. Also, I don't recommend trying to use this with viewports. If you are tagging objects in viewports, I think using the data tag as-is works better than trying to script it. DT_AssociateWithObj.vwx Quote Link to comment
Martin Lerch Posted May 4, 2020 Author Share Posted May 4, 2020 ok, thanks for the input and recommendations! 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.