herbieherb Posted August 16, 2019 Share Posted August 16, 2019 Is there a way to get the handles of the geometry of complex line styles? I need to get the thickness of these lines. Quote Link to comment
JBenghiat Posted August 19, 2019 Share Posted August 19, 2019 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) Quote Link to comment
herbieherb Posted August 20, 2019 Author Share Posted August 20, 2019 Thx a lot. That worked fine. What exactly does the .aux method? Btw. here is the Tool where i needed the code: Quote Link to comment
JBenghiat Posted August 20, 2019 Share Posted August 20, 2019 1 hour ago, herbieherb said: Thx a lot. That worked fine. What exactly does the .aux method? The aux list contains additional VW objects that are attached to another object, including records and special groups. See this article on viewing the VW drawing structure: http://developer.vectorworks.net/index.php/SDK:Debugging_the_Vectorworks_file 1 Quote Link to comment
herbieherb Posted August 20, 2019 Author Share Posted August 20, 2019 Ok, understood. Very frustrating that enabling the debug-menu only works on MacOS. Quote Link to comment
JBenghiat Posted August 20, 2019 Share Posted August 20, 2019 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. Quote Link to comment
herbieherb Posted August 21, 2019 Author Share Posted August 21, 2019 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? 2019-08-21-10-27-24.mp4 Quote Link to comment
JBenghiat Posted August 21, 2019 Share Posted August 21, 2019 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. Quote Link to comment
Pat Stanford Posted August 12, 2022 Share Posted August 12, 2022 I hate adding to old threads, but here goes. @JBenghiat Do you know of a way to ADD a custom object to the Aux List using Python or VS? Or would that require SDK? Quote Link to comment
JBenghiat Posted August 15, 2022 Share Posted August 15, 2022 It IS possible with Python: if you look at the dict for vs.Handle, .aux give you a handle to the aux list, at which point you can traverse just like any other container. I’m not aware of a way to access the aux list with VS. Quote Link to comment
Recommended Posts
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.