Jayme McColgan Posted October 30, 2022 Share Posted October 30, 2022 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... Quote Link to comment
twk Posted October 30, 2022 Share Posted October 30, 2022 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 2 Quote Link to comment
JBenghiat Posted October 31, 2022 Share Posted October 31, 2022 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. Quote Link to comment
Jayme McColgan Posted November 22, 2022 Author Share Posted November 22, 2022 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? Quote Link to comment
MullinRJ Posted November 23, 2022 Share Posted November 23, 2022 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 Quote Link to comment
Jayme McColgan Posted November 23, 2022 Author Share Posted November 23, 2022 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 Quote Link to comment
tbexon Posted November 27, 2022 Share Posted November 27, 2022 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? Quote Link to comment
Jayme McColgan Posted November 28, 2022 Author Share Posted November 28, 2022 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. 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.