Hi, as the title says I found a lisp routine on the internet to change page setups on multiple layouts. The lisp worked but on some of the layouts it moved the viewport off the paper background (see attached). The layouts print fine but the only way to get the viewport back on to the background is to open the page setup and click modify, then ok and close. I tested this on a .dwg that I had saved to my computer rather then on one in the main folder but I would like to do this to to all are maps since our IT decided to rename our printer and now all pages setups are no good.All I know about lisp is how to run one. Could someone try this out and see if it works for them or maybe see whats wrong with the code?
;; Copy current layout page setup to all layout tabs
(defun c:CPS (/ Adoc Layts clyt)
(setq aDoc (vla-get-activedocument (vlax-get-acad-object))
Layts (vla-get-layouts aDoc)
clyt (vla-get-activelayout aDoc)
(vl-remove (vla-get-name clyt) (layoutlist))
(vla-copyfrom (vla-item Layts itm) clyt)
I am using often this nice routine MPL coming from a french forum www.cadxp.com (Author: Patrick_35)
Attention: MPL.lsp + MPL.dcl
so you have to copy these 2 files into your native AutoCAD folder
or add the path (where are these 2 files) to the SUPPORT of your AutoCAD ...
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register