Author Topic: Any way to access WSSETTINGS?  (Read 3330 times)

0 Members and 1 Guest are viewing this topic.

mr_nick

  • Guest
Any way to access WSSETTINGS?
« on: July 17, 2008, 07:28:47 PM »
Does anybody know of a way to accees the workspace 'save' settings programatically? I want to try and toggle between auto and off without using the dialog box but have so far drawn a blank. I have read elsewhere that there is a regkey 'WSAUTOSAVE' which controls it but this doesn't appear to be the case. I have found that this key doesn't exist under my current profile (I'm using ACA2009 with the UK profile). Even when I use the US profile where the regkey does exist, the Dword value never changes when I toggle the setting in CAD. I even tried manually creating the key but that drew a blank also. I have checked all the system variables and there appears to be nothing in there that alters when I toggle the setting. he only thing I know for definite that changes is the main cui file but doing file comparisons on before and after shows no changes which would be responsible for storing the save state.

Does anybody know if there is any way to programatically get to the save setting - it seems odd that Autodesk give you access to be able to change the workspace via WSCURRENT but then force you to use the dialog box to alter the other setting.

Crank

  • Water Moccasin
  • Posts: 1503
Re: Any way to access WSSETTINGS?
« Reply #1 on: July 18, 2008, 03:28:40 AM »
Try the WSSAVE command: (command ".WSSAVE" "test")
You'll have to find a way to find out if the workspace already exists, because you may be asked to overwrite the existing workspace. The variable EXPERT doesn't help here.
Vault Professional 2023     +     AEC Collection

mr_nick

  • Guest
Re: Any way to access WSSETTINGS?
« Reply #2 on: July 18, 2008, 03:41:09 AM »
I don't want to save the workspace - I just want to be able to toggle the option to automatically save the workspace when closing CAD between on and off.

lispit

  • Guest
Re: Any way to access WSSETTINGS?
« Reply #3 on: July 18, 2008, 11:39:54 AM »
I don't want to save the workspace - I just want to be able to toggle the option to automatically save the workspace when closing CAD between on and off.

(setenv "WSAUTOSAVE" "1") enables autosave.
You have to make sure you have the ‘wscurrent’ variable set. When switching between profiles it sets a workspace for you but it will not automatically set the wscurrent variable which is needed for the ‘wsautosave’ registry key. I ran into this when I was setting up our machines with 2009

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8825
  • AKA Daniel
Re: Any way to access WSSETTINGS?
« Reply #4 on: July 18, 2008, 11:49:12 AM »
Welcome to TheSwamp lispit  :-)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Any way to access WSSETTINGS?
« Reply #5 on: July 18, 2008, 01:04:23 PM »
Welcome LispIt, good to see you here.  :-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

mr_nick

  • Guest
Re: Any way to access WSSETTINGS?
« Reply #6 on: July 18, 2008, 10:35:11 PM »
(setenv "WSAUTOSAVE" "1") enables autosave.
Fantastic - I just wish Autodesk would document these kinds of things -it'd make life a bit easier!!