Guys,
Does anyone have a LISP Routine to erase all the paperspace tabs and layouts on a drawing ? If so could i get a copy, please ?
Stephen
|
Guys,
Does anyone have a LISP Routine to erase all the paperspace tabs and layouts on a drawing ? If so could i get a copy, please ?
Stephen
(vl-load-com)
(vlax-for LAYOUT (vla-get-layouts(vla-get-activedocument(vlax-get-acad-object)))
(vl-catch-all-apply 'vla-delete (list LAYOUT))
)
,but one Paperspacelayout (the last active) cannot deleted
Thomas,
Do you know if or how to rename the last active paperspace tab left ?
I can have it erase everything on that tab though would like to be able to rename it back to paperspace.
Stephen
Try this
Code:(vlax-for LAYOUT (vla-get-layouts(vla-get-activedocument(vlax-get-acad-object))) (cond ((>(vla-get-taborder LAYOUT)1) (vl-catch-all-apply 'vla-delete (list LAYOUT)) ) ((=(vla-get-taborder LAYOUT)1) (not(vl-catch-all-error-p (vl-catch-all-apply 'vla-put-name(list LAYOUT "PAPER")))) ) ) )
Thanks alot Thomas, that has made the task of preparing drawings a little easier.
Stephen