matteoluigi Posted January 5, 2023 Share Posted January 5, 2023 (edited) I can't find a command to set an active layer in vectorscript. a) does there exist any? b) does there exist a command to toggle/activate a saved view inside vectorscript? Edited January 5, 2023 by matteoluigi Quote Link to comment
Peter Vandewalle Posted January 5, 2023 Share Posted January 5, 2023 To activate a layer just use Layer('name'). If no layer with the name exists, the layer will be created and it will become active. If the layer does exist, it just becomes active. https://developer.vectorworks.net/index.php/VS:Layer There's no way to activate a saved view in scripting. 1 Quote Link to comment
matteoluigi Posted January 5, 2023 Author Share Posted January 5, 2023 (edited) < you already answered the question, sorry > that's a pity, that i can't activate a saved view from a script. Edited January 5, 2023 by matteoluigi Quote Link to comment
Vectorworks, Inc Employee Julian_Carr Posted January 5, 2023 Vectorworks, Inc Employee Share Posted January 5, 2023 Actually, you can use these three procedures to manipulate saved views. The second one will activate an existing saved view: VSave('view name'); VRestore('view name'); VDelete('view name'); These commands can also be very useful in a script when you need to change the view in a script to perform some operation (like switch to Top/Plan) but then restore the original view once you are done. 4 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.