shodkin Posted July 1, 2020 Share Posted July 1, 2020 Hello, I was wondering if it was possible to get any more advanced user input while running a script? As a basic example: something similar to the scale tool which allows users to select a distance, and then another distance, and then performs an operation As a more complex example: something that would allow a user to place a symbol in the document which they would like to duplicate along a path, then draw a polyline and, as the user is drawing the polyline, calculating a bounding box for the symbol and have it "traced" along the polyline that is being drawn to give the user a real time preview of what will be drawn when the operation is completed? Similar to the "Duplicate Along Path" preview button but in real time with the user able to change the path object and instantly see the result? I thought Id ask this in the Vectorscript section due to the possibility of having the user using Vectorworks functions/tools to draw a polyline with the mouse for example, but any suggestions for Python also very welcome! Many thanks Quote Link to comment
Julian Carr Posted July 1, 2020 Share Posted July 1, 2020 In my experience, user input interruptions in Vectorscript are very very limited and often unreliable, and I suspect it would be the same in Python. You really need to go to the SDK for things like this. 2 Quote Link to comment
JBenghiat Posted July 2, 2020 Share Posted July 2, 2020 Something like the scale dialog, definitely. RunTempTool() allows for a number of tool actions to be called from a script. Getting a preview of objects more than a line or a rectangle is not possible with VS. FYI, the API for VS and python is essentially identical, with python having a larger native set of commands and allowing access to any installable module. 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.