Jump to content
Sign in to follow this  
har

access program settings

Recommended Posts

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!

Share this post


Link to post

- 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.

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

 

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.

×
×
  • Create New...