Jump to content
herbieherb

Get geometry of complex line styles

Recommended Posts

Is there a way to get the handles of the geometry of complex line styles?

I need to get the thickness of these lines.

Share this post


Link to post

You can in Python, but not VS. 

 

Completely untested, but something like this should get you the group that represents the LS definition, and you can start to iterate over its geometry

 

hLS = vs.GetObject('<LINE STYLE NAME>')
if hLS:
    hAuxItem = hLS.aux
    kTypeGroup = 11
    while ( vs.GetTypeN(hAuxItem) != kTypeGroup and vs.GetTypeN(hAuxItem) != 0):
        hAuxItem = vs.NextObj(hAuxItem)
    if ( vs.GetTypeN(hAuxItem) == kTypeGroup):
        hLSGeometry = vs.FInGroup(hAuxItem)

 

 

Share this post


Link to post

Thx a lot. That worked fine. What exactly does the .aux method?

 

Btw. here is the Tool where i needed the code:

 

Share this post


Link to post
11 minutes ago, herbieherb said:

Ok, understood.

 

Very frustrating that enabling the debug-menu only works on MacOS.

 

It should work on both platforms. In fact, the screen shot in the link is Windows.

Share this post


Link to post

The German support once told me that it only works on Mac. Is it possible that DialogBuilder can only be activated in the Designer version?

I always get an identifier not declared error when i try to activate. Am I doing it wrong?

Share this post


Link to post

Possibly if you have Fundamentals it is not available, or the command may also be affected by using a localized version. It's definitely not a platform-specific issue.

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