If you have a specific layout you want it to always go to, then I think you can make a button to do that ...
I would think you would want a new button, and not a reactor (just a thought I wanted to put out there =D).
Actually Tim, I want it to work with the following code.
(setq space (getvar "tilemode"))
;
(if (= space 1);;; Model space
(progn
(command ".zoom" "E")
(command ".-layer" "thaw" "0" "on" "0" "set" "0" "")
(command "tilemode" 0)
(if (/= (getvar "cvport") 1)
(command ".pspace"))
*** Enter Code to make it go to required tab ***
(setvar "ltscale" (/ dims 2))
(command ".zoom" "E")
)
)
(if (= space 0); Paper space
(progn
(if (/= (getvar "cvport") 1)
(command ".pspace"))
*** Enter Code to make it go to required tab ***
(command ".-layer" "thaw" "0" "on" "0" "set" "0" "")
(setvar "ltscale" (/ dims 2))
(command ".zoom" "E")
)
)
Usually the required tab is the first tab in any given set of tabs on a drawing. Sometimes though, that required tab would be second or third.
As I posted initially, the tab would be one of a series of possible names; S-1, S-11, S1.1, S1.1A, SF101, etc.
My initial thought is to create a conditional,
(setq tab-1 (car (layoutlist)))
(progn
(cond ( (= tab-1 "S-1")
(setvar "ctab" tab-1))
( (= tab-1 "S-11")
(setvar "ctab" tab-1))
( (= tab-1 "S1.1")
(setvar "ctab" tab-1))
... etc, etc.
I'm not quite understanding this though,
...
(foreach tab (layoutlist)
(if (not (member tab (list "Model" ctab)))
(progn
...
I should say I don't understand how layoutlist is working here. From the examples CAB posted above, I'm not following them very well.
And I realize my code for breaking the layoutlist down would be very tedious. Do you have another way for getting the list broken down to the individual tabs names from within the list ??
*** Edited ***
Is the preferred tab always the first one after the Model Space Tab?
CAB - 9 times out of 10, Yes.
Does the preferred tab always have the same name or is the name unique in some way?
It has a unique name as mentioned above (at least I think it's unique).