If you are starting from a new drawing it could be as simple as this:
EDIT:Code:(defun c:mkl (/ cnt lnum) (setvar 'cmdecho 0) (while (progn (initget 7) (setq cnt 1000 lnum (getint "\nHow Many Layouts: ") ) (if (<= lnum (length (layoutlist))) (princ "\nNumber is below/equal current number of Layout:") nil ) ) ) (foreach itm (layoutlist) (command "layout" "rename" itm (strcat (itoa (setq cnt (1+ cnt)))) ) ) (repeat (- lnum (length (layoutlist))) (command "layout" "new" (strcat (itoa (setq cnt (1+ cnt))))) ) (princ) )
Is there a situation that you need to add a layout on an existing drawing? were your layout tabs always have that name convention?
The code posted above will still work only problem is the list generated by (layoutlist) will be sorted automatically, and that isn't always good. (but in your case i think its okay)




Reply With Quote
Copy a layout you say? its easy really. but do this apply to new drawings only? for an existing one, do you copy the first layout tab [1001] or the last?



Bookmarks