Jump to content
Developer Wiki and Function Reference Links Read more... ×
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

Ok, understood.

 

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×