I'm having difficulty with this, and need some help.
What I need is to check to see if a specific workspace is created, and if so set it. It not, then return with an error message.
I'm having trouble with accessing the already created workspaces, and verifying that the workspace is created.
Solved! Go to Solution.
Solved by BlackBox_. Go to Solution.
(getvar "wscurrent") will give you the current workspace. I would definitely check that first.
After that you might look at this thread
@jclaidler wrote:I'm having difficulty with this, and need some help.
What I need is to check to see if a specific workspace is created, and if so set it. It not, then return with an error message.
I'm having trouble with accessing the already created workspaces, and verifying that the workspace is created.
Do you have to iterate the existing workspaces provided by Main/Enterprise CUI(x), or is a simple T, or Nil returned value sufficient?
(defun _WSCURRENT (workspace) ;; Example: ;; (_WSCURRENT "YourWorkspaceNameHere") (not (vl-catch-all-error-p (vl-catch-all-apply 'setvar (list 'wscurrent workspace)) ) ) )
"How we think determines what we do, and what we do determines what we get."
@dbroad3 wrote:(getvar "wscurrent") will give you the current workspace. I would definitely check that first.
After that you might look at this thread
If obtaining a list of existing workspaces is essential, methinks it would be simpler, certainly more efficient, to instead employ a .NET LispFunction Method to return such, taking a single string argument (the CUI[x] to cull).
Cheers
"How we think determines what we do, and what we do determines what we get."
@jclaidler wrote:
Thanks... this is exactly what I needed.
You're welcome; I'm happy to help.
Cheers :beer:
"How we think determines what we do, and what we do determines what we get."