Jump to content
Martin Lerch

Data tagging objects with marionette

Recommended Posts

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

 

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


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

Share this post


Link to post

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

Share this post


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

Share this post


Link to post

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

 

1629625349_Bildschirmfoto2020-05-03um17_22_30.thumb.png.16a7dbf5a126738730ac2977d37017c3.png

Share this post


Link to post

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.

Share this post


Link to post

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 

 

 

Share this post


Link to post

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

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...