Jump to content

overwrite Vectorworks Preferences.xml from script


Recommended Posts

i have a script that replaces the Vectorworks Preferences.xml file but when i go to restart VW22 for the new preferences to take effect it takes the current settings in the app and rewrites the file i jsut put in there. 

 

is there a way to "reload" the Vectorworks Preferences before closing it? the only way i can find to replace the existing file is to do it while VW is closed... 

Link to comment
34 minutes ago, Jayme McColgan said:

the only way i can find to replace the existing file is to do it while VW is closed... 

Yes, this is my experience as well. I believe Vectorworks writes all settings to XML settings files at application exit/close

  • Like 2
Link to comment
  • 4 weeks later...
On 10/30/2022 at 9:16 PM, JBenghiat said:

Yes, VW writes preferences to disk on close. This sounds potentially dangerous— using SetPref calls to make the changes you want is probably a better option anyway. 

hmm using SetPref() might be a better idea. are there any other files that writes the file on close? 

Link to comment
43 minutes ago, Jayme McColgan said:

are there any other files that writes the file on close? 

 

I would imagine the four SavedSettings files work the same way.

 

SavedSettings.xml

SavedSettingsDialog.xml
SavedSettingsRsrcMgr.xml
SavedSettingsUser.xml

 

And I just noticed "IFC_DM3_DefaultMapping.xml" is in the same User Settings folder, so I imagine it may be rewritten at closing, too; as well as the XML files in the DWG_DXF and DWF folders. 

 

Raymond

Link to comment
On 10/30/2022 at 9:16 PM, JBenghiat said:

Yes, VW writes preferences to disk on close. This sounds potentially dangerous— using SetPref calls to make the changes you want is probably a better option anyway. 

 

using VW 2022, vs.SetPref() in the install script seems to be crashing VW. i have removed everything from the install script except the SetPref stuff and it still crashes. when i remove all the SetPref lines it completes like normal.  bug? known issue?

 

vs.SetPref(49,False) #hidePageBoundary

 

 

Link to comment
On 11/27/2022 at 5:19 AM, tbexon said:

Do you need to set the preference in the install file? Could you not just set it when whatever script you are installing first runs?

not really... the install file is how will be distributing all the custom plugins, workspaces, preferences, and such to the users in our company. the current process is painful...  i need the ability to set all the preferences while installing all the plugins and workspaces. 

Link to comment

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.

×
×
  • Create New...