Author Topic: get the name of workspace and activate  (Read 1267 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
get the name of workspace and activate
« 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 .  :-)

kpblc

  • Bull Frog
  • Posts: 396
Re: get the name of workspace and activate
« Reply #1 on: July 30, 2014, 01:29:19 AM »
Check WSCURRENT system variable. But how to get all workspace names - I don't know :(
Sorry for my English.

Coder

  • Swamp Rat
  • Posts: 827
Re: get the name of workspace and activate
« Reply #2 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 . :-)

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: get the name of workspace and activate
« Reply #3 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.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}