Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Simple Lisp

1 REPLY 1
SOLVED
Reply
Message 1 of 2
irishrandy26
345 Views, 1 Reply

Simple Lisp

I am trying to create a simple lisp to close and save the drawing. But while doing so I want the command to select the first layout tab in the drawing but each drawing has a different named layout tab. How can I do this? As of right now it is selecting the model tab but I don't want to close the drawing looking at the model tab. here is what I have,

 

(defun C:clo()
(command "ctab" "model" "")
(command "zoom" "e")
(command "qsave")
(command "close")
)

 

1 REPLY 1
Message 2 of 2
Kent1Cooper
in reply to: irishrandy26

You can load up pbejse's (layorder) routine here [there are other such routines elsewhere], which returns a list of paper-space Layout names in left-to-right order, and set the current tab to the first name in the resulting list with:

 

(setvar 'ctab (car (layorder)))

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost