Jump to content
twk

Data Tags

Recommended Posts

There isn't much script functionality on the DevWiki regarding Data Tags.

 

I was wondering if anyone knew how to get a handle to an object a data tag is attached to.

 

Say I can collect all the data tags in a viewport, as handles, does anyone know how to get handles to objects those data tags are attached to?

 

Cheers,

Tui

 

 

Share this post


Link to post

Hello Tui,

 

I will send you a simple script how this can be done.

 

Best Regards,

Kostadin Ivanov

Share this post


Link to post

h = Data Tag Object Handle

import vs; 
def GetTaggedObject(h):
    result = False;
    num = vs.GetNumAssociations(h);
        
    assH = None
    assKind = None
    value = None
    i = 0;
    while(i < num and result == False):
        assH, assKind, value = vs.GetAssociation(h, i);
        if (assKind == 37):
            result = True;
        i = i + 1;
    return result, assH;

 

  • Like 1

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