Jump to content
Developer Wiki and Function Reference Links ×

Data tagging objects with marionette


Recommended Posts

  • 1 month later...
  • Vectorworks, Inc Employee

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.

Link to comment
  • Vectorworks, Inc Employee

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.

 

Screen Shot 2020-04-28 at 3.39.41 PM.png

Link to comment
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!

Link to comment
  • Vectorworks, Inc Employee

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.

Link to comment

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

1091433381_Bildschirmfoto2020-05-04um15_31_20.thumb.png.cb371cb0e914ccef2a5193e5ffca5ac7.png

 

 

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 

 

 

Link to comment
  • Vectorworks, Inc Employee

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

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
Reply to this topic...

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