har Posted June 15, 2016 Share Posted June 15, 2016 Hi all, I'm just barely getting started with Python in VW and have created some custom scripts for Marionette. Now, I face another task... Here's the story: We're using Vectorworks both in the Spotlight environment and with a 3rd Party plugin for other plan types (connectCAD). To properly work, these need different system settings (interactive settings - box sizes). I was hoping to create a script palette that would quickly switch between the two applications, doing the following: - change interactive settings - change active workspace - apply proper grid/snap settings I've looked in the VS function reference but I can't seem to find anything related to my task. Can I even access these settings from Python/VS? Thanks in advance for any answers! Quote Link to comment
Hippocode Posted June 15, 2016 Share Posted June 15, 2016 - change interactive settings - change active workspace - apply proper grid/snap settings I'm pretty sure you can change the active workspace using one of the VS commands. There are some available command "SetProperty"? or something similar will actively change settings. Other common settings are saved into an XML file in your user folder, but sadly those are read only. If there is no function or identifier available for the other setting you would like to change, then you can't. Quote Link to comment
har Posted June 16, 2016 Author Share Posted June 16, 2016 Hi Hippocode, thanks for your answer. Also, sorry for my late reply. I dug a little deeper today and found the correct selectors for SetPref and SetPrefReal that I need. Really the only thing I haven't found is how to change the current workspace - Would you be able to point me in the right direction here? Quote Link to comment
Hippocode Posted June 16, 2016 Share Posted June 16, 2016 Really the only thing I haven't found is how to change the current workspace - Would you be able to point me in the right direction here? Couldn't find it either, I thought it was possible :crazy: It is possible with the SDK. Either way, you probably won't be able to change palette size and positions either. Have you thought about using different user accounts instead ? Each user account can have it's own preferences. Quote Link to comment
har Posted June 16, 2016 Author Share Posted June 16, 2016 Alright, seems there is no way to change the workspace after all. User accounts won't work for us. We're switching back and forth constantly and this needs to happen quickly. In the time I need to change my user, I adjust the settings myself. Also, we're on a managed network, IT wouldn't want to handle that just for our convenience. Just for future forum searches: This is the function reference for SetPref: http://developer.vectorworks.net/index.php/VS:SetPref SetPref is used for stuff that accepts boolean values. For anything else, you can use SetPrefReal, SetPrefInt, SetPrefString, etc. The selectors are in Appendix F: http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#Appendix_F_-_Preference_Selectors Quote Link to comment
Hippocode Posted June 16, 2016 Share Posted June 16, 2016 The selectors are in Appendix F: http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#Appendix_F_-_Preference_Selectors Additional selectors can be found in the "MiniCadCallBacks.h" header file of the SDK source. I don't think all selectors are listed in the appendix. 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.