TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Coder on July 30, 2014, 01:18:33 AM

Title: get the name of workspace and activate
Post by: Coder on July 30, 2014, 01:18:33 AM
Hello guys .

How can I get the name of the active workspace ? and how can I activate a specific workspace  ?

Many thanks in advance .  :-)
Title: Re: get the name of workspace and activate
Post by: kpblc on July 30, 2014, 01:29:19 AM
Check WSCURRENT system variable. But how to get all workspace names - I don't know :(
Title: Re: get the name of workspace and activate
Post by: Coder on July 30, 2014, 11:12:51 AM
Thank you so much for your help .

I need to have a play with all names of the Work Spaces and have them in a list to be able to activate the one I want later on .

Thank you . :-)
Title: Re: get the name of workspace and activate
Post by: dgorsman on July 30, 2014, 12:25:31 PM
The current workspace name can be a null string (""), especially if switching profiles in-session.

If you wanted to get clever, you could hook a reactor to monitor the WSCURRENT system variable and have it log the workspaces to the registry (e.g. under the current profile) or an external data file as they are changed.

If you wanted to get *really* clever the available workspace names should be available through dotNET which could be wrapped as a LISP function.  Somebody may have already done this somewhere.