Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the following code:
(defun ECR:setTab ( TAB / )
;; !!IMPORTANT!! TAB NAMES ARE CASE SENSITIVE OR ELSE IT DOESN'T WORK
;; CHANGE TABS AND DO ZOOM EXTENTS ON THAT TAB
(cond
((member TAB (layoutlist))
(setvar "ctab" TAB)
(command "zoom" "extents")
);LAYOUT EXISTS
(t
(princ (strcat "\n-\n" TAB " does not exist to be set (setTab). Note that this function is case sensitive.\n-\n"))
);ELSE
);COND
(princ)
)
Do I have to change it to the following code to allow "Model" to pass through it since (member "Model" (layoutlist)) returns nil. Why is this happening? Does layoutlist only check for tabs other than Model?
(defun ECR:setTab2 ( TAB / )
;; !!IMPORTANT!! TAB NAMES ARE CASE SENSITIVE OR ELSE IT DOESN'T WORK
;; CHANGE TABS AND DO ZOOM EXTENTS ON THAT TAB
(cond
((or (member TAB (layoutlist)) (eq TAB "Model"))
(setvar "ctab" TAB)
(command "zoom" "extents")
);LAYOUT EXISTS
(t
(princ (strcat "\n-\n" TAB " does not exist to be set (setTab). Note that this function is case sensitive.\n-\n"))
);ELSE
);COND
(princ)
)
or is there another way that allows "Model" to pass through?
Thanks!
Solved! Go to Solution.