Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change Multiple Page Setups

121 views
Skip to first unread message

Shawn McDonald

unread,
May 15, 2003, 7:53:23 PM5/15/03
to
Many of my files have several (20+) Page Layouts each. Each layout has 4-5
Page setup names for various printers. If I need to print test plots, I
have to set all layouts individually to "11x17-Black-Office1" then change
them all to "11x17-Color-Office2" to print to our production office, which
is a 45 minute ferry ride away. Then, to archive electronically (a
requirement for several clients) I have to again individually set them all
to "11x17-Color-PDF." I have to reset 20 identical page layouts three times
each. Anyone have a way to streamline the process?

Anyone know if LISP can be used to change Page Setup names? The names are
the same in every drawing, so they could be written into a routine if that
would work.

I heard something a while back about the PUBLISH command in 2004. Does this
have any features that might help me out? I can probably get the bean
counters to approve my upgrade if it'll save me 4 hours a week.

Thanks-
Shawn McDonald


Martin Schmid

unread,
May 16, 2003, 9:30:23 AM5/16/03
to
Dude... why don't you use Page Setups in lieu of all those layouts? Use
Page Setups to define printer/pens/scale, etc.

A Layout should define just that, a layout with a specific title block, view
ports, etc. A Page Setup defines all the plotting characteristics.

I.e, I may have 5 layouts in a drawing, but they are for 1 layout
representing the overall drawing, then 4 other layouts representing
different views, areas, etc. I also have 5 page setups as follows:
FULL SIZE DRAFT (Plotter)
FULL SIZE FINAL (Plotter)
HALF SIZE DRAFT (Plotter)
HALF SIZE FINAL (Plotter)
11x17 PRINT (Printer)

So, instead of having 25 layouts (5 layouts x 5 printers=25) I have 5
layouts (much easier to manage), and 5 page setups for the output I need.
These setups can easily be exported/imported between drawings, and when
batch plotting, you don't even need to setup to be in the drawing
necessarily, you can use a template drawing w/ page setups, furter
simplifying your life.


"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message
news:F578773DAD334D3C...@in.WebX.maYIadrTaRb...

Shawn McDonald

unread,
May 16, 2003, 2:07:19 PM5/16/03
to
Sorry Martin, but that's exactly what I'm doing. I don't have 5 layouts x 5
page setups, I have 25 layouts.

Sorry for the long reply, but I want to make sure there's no more confusion.
I've included a walk-through of a typical project below in case there are
any questions. If I'm missing something obvious, it's because I've had no
formal training since R14, and nobody I've ever worked with has been able to
efficiently use Layouts and Page Setups. If I should be able to do
something I can't, I don't know about it for the same reason. I'm pretty
much self-taught in this area.

I have 25 different figures (sheets, pages). 1 layout tab for each figure.
All 25 figures are on 11x17 title blocks, and are identical as far as
plotting is concerned. Each of them can be plotted using one of four page
setups. The page setup names are:

11x17-Landscape-BI-Black
11x17-Landscape-BI-Color
11x17-Landscape-PDF-Color
11x17-Landscape-SEA-Color

BI is our home office (Bainbridge Island)
--Black is an HP Laserjet 5000
--Color is an HP 1055CM+
SEA is our Seattle office (45 minutes via ferry)
--Color is a SAVIN color laser printer
PDF is the PDF layout

All I need is a way to automate changing all Layouts from "11x17-BI" to
"11x17-SEA" without opening each sheet individually. With regen time, etc.
it takes up to 30 minutes to do this- and is my most redundant, mind-numbing
task.

The page size/orientation is included in the page setup name because some
drawings have more than one title block size (larger DWGs with 10+ figs stay
one size/orientation). I have 16 different title block sizes (ANSI
A,B,C,D,E and ARCH E portrait and landscape, and 11x26,30,36,42 for long
x-sections). Each of these has 2-4 Page Setup Names. The different Page
Setups all have the appropriate CTB, XY Origin, and sometimes Scale settings
(ie- 22x34x.5 for printing D size to 11x17). A print from any printer comes
out with even edges and a binding edge to the right or top (11" sizes) or
centered on the page (ANSI C and up).

If you want to know more of what I do and why, read on.

We're an Environmental Consulting firm. One of our typical drawing sets
shows contaminant levels for specific wells. The site that most recently
gives me this headache has 20 wells with 25 different contaminants. Each
contaminant is it's own figure. Using LD3/Civil3's Point tools, I import
each contaminant value and place it by the well directly from an Access
Database query. Using an extra layout with all contaminants unfrozen, I
fine-tune the placement. Effectively, I've reduced what once was a 24 hour
job to a little over an hour. Now I have to make test-plots. I plot
everything to our BI office on the slow (1 page every 1.5 minutes) HP
1055CM+. Everything's setup, I just highlight all layouts, hit plot, and
get a cup of coffee. My machine is done, and the plotter is chugging away
by the time I get back to my desk.

Next day. Everything looks good, a couple minor edits, and time for
production. We need 25 copies of the report. The HP 1055CM+ will do it in
about 8 hours (and every copy is curled from the roll). The SAVIN will
finish in about 30 minutes (28 copies a minute) including transmission via
DSL line, on nicely pre-cut paper. Much nicer product, not a bad system.*

Problem is, to change to the Seattle printer, I have to switch to each
layout, then "Page Setup-Page Setup name" on each page. If I highlight all
layouts at once- Page Setup is grayed out. If I highlight all and "Plot"
the page setup name is grayed out in the plot DB. Don't know why Autodesk
disallows these functions, but they do. The process adds 20-30 minutes each
time I need to change printers. All I need is a way to automate changing
all Layouts from "11x17-BI" to "11x17-SEA"

*I know we should have the Color Laser this side, but they're not going to
give it up. They want to 'integrate' the two offices, which is great,
except when it comes to production. Especially with all the last minute
stuff we do.


"Martin Schmid" <martin...@sbcglobal.net.nospam> wrote in message
news:EF92DBCB887B5FA1...@in.WebX.maYIadrTaRb...

Jason Piercey

unread,
May 16, 2003, 3:26:39 PM5/16/03
to
Shawn,

Try this out

; Jason Piercey . May 16th, 2003
; assign a pagesetup to a layout
; [layout] - string, layout name
; [setup] - string, pagesetup to assign
; return: T or nil
(defun putPagesetup (layout setup / layouts plots)
(defun item-p (collection item)
(if
(not
(vl-catch-all-error-p
(vl-catch-all-apply
'(lambda () (setq item (vla-item collection item))))))
item
)
)
(and
(or *acad* (setq *acad* (vlax-get-acad-object)))
(or *doc* (setq *doc* (vla-get-activedocument *acad*)))
(setq layouts (vla-get-layouts *doc*))
(setq plots (vla-get-plotconfigurations *doc*))
(setq layout (item-p layouts layout))
(setq setup (item-p plots setup))
(not (vla-copyfrom layout setup))
)
)

to assign a single pagesetup to all layouts in a drawing file
you can do this:

(foreach x (layoutlist) (putPagesetup x "yourPagesetupName")

--

-Jason
Member of the Autodesk Discussion Forum Moderator Program


"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message
news:F578773DAD334D3C...@in.WebX.maYIadrTaRb...

> Anyone know if LISP can be used to change Page Setup names? The names are

Martin Schmid

unread,
May 17, 2003, 3:41:19 PM5/17/03
to
While Jason Piercey gave you what you asked, namely a LISP to automate
setting all the layouts of a given file to a certain value, I believe what
you are looking for is a fast way to send a bunch of layouts (25
containments) from perhaps multiple drawing files (20 wells) to a specified
plotter.

The easiest way to get your hard copies: Use batch plot.
1. Open batch plot.
2. Select Add Drawing from the menu/toolbar
3. Shift/Ctrl Click to select all the drawings
4. After all drawings have been added, highlight all files in the Drawing
File list.
5. Select the layouts button, and select "All Layouts" (at this step, you
could pick individual layouts for a given dwg file if you needed to, instead
of All)
6. Select the page setups button, and select what ever setup you want to
use, i.e. "11x17-Landscape-BI-Black" (it can be from ANY file)
7. Save your batch
8. Hit the plot button.

Now you have sent 500 (25x20) sheets to "11x17-Landscape-BI-Black"


Now, say you need to send this same output to 11x17-Landscape-SEA-Color:
1. Open the batch file (if it isn't already):
2. Highlight all the drawing files
3. Hit the Page Setups button, then select "11x17-Landscape-SEA-Color" from
one of your files.
4. Hit plot.

Now you have 500 color plots at the Seattle office.


I hope this makes sense...
MS


"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message

news:6E42428F9DAAFF9A...@in.WebX.maYIadrTaRb...

Shawn McDonald

unread,
May 19, 2003, 1:29:55 PM5/19/03
to
Jason- this looks like what I need, I'm afraid I'm a little illiterate as to
what I need to do with it. My IT guy tried to look at it , but he's too
green with ACAD and too dusty with LISP. I loaded the routine, but when I
entered PUTPAGESETUP I got:

*Cancel*
too few arguments

I think part of the problem is understanding what to do with this:

>to assign a single pagesetup to all layouts in a drawing file
>you can do this:

>(foreach x (layoutlist) (putPagesetup x "yourPagesetupName")

It seems that's an instruction for me, but I'm afraid I can't figure out
what it says. I'm fairly LISP illiterate- I've never even known anyone who
used it I'm afraid. Sorry-

Shawn McDonald


"Jason Piercey" <Jason@AtrEngDotCom> wrote in message
news:A36B59AE8B0659BA...@in.WebX.maYIadrTaRb...

Shawn McDonald

unread,
May 19, 2003, 1:09:51 PM5/19/03
to
Sorry, again, I have one drawing file with 25 layouts- one site plan with 20
wells, 25 contaminants at the site. The 20 figures detail contaminant
levels in all wells- F1 is Gasoline (all wells), F2 is Diesel, F3 Oil, etc.

The problem with batch plot is it doesn't allow me to send multiple copies.
Often times I need to print 25 copies of each figure. Using batchplot only
sends one sheet at a time. If I want 25 copies, I need to send the file 25
times, and I'd tie the printer up for hours (625 plots processed
individually), so that's not an option here. But thanks-

Shawn


"Martin Schmid" <martin...@sbcglobal.net.nospam> wrote in message

news:8FA53036814A7936...@in.WebX.maYIadrTaRb...

Jason Piercey

unread,
May 19, 2003, 2:50:52 PM5/19/03
to
What I provided was a function not a command so it must be
enclosed with a set of ( ) and called with the appropriate type
and number of arguments. Regardless of that copy and paste
the following into a txt file and save it as psetup.lsp then load it
using the APPLOAD command and type psetup at the command
line, it should operate like any standard AutoCAD command. I
did not test this very much, so hollar if it acts "goofy"

(defun massoc (key alist / x nlist)
(foreach x alist
(if (eq key (car x))
(setq nlist (cons (cdr x) nlist))
)
)
(reverse nlist)
)


; Return: list of all pagesetups defined in the current drawing or nil
(defun getPagesetups ()
(massoc 3 (dictsearch (namedobjdict) "Acad_PlotSettings"))
)

; Jason Piercey . May 19th, 2003
; assign pagesetup to layout(s)
; LIMITED testing
; written for Shawn McDonald
(defun c:psetup (/ lst page res)
(setq lst (mapcar 'strcase (getPagesetups)))
(while (not page)
(setq page (strcase (getstring "\nspecify pagesetup to apply: ")))
(if (or (= "" page) (not (member page lst)))
(progn (princ "\npagesetup not found") (setq page nil))
)
)

(initget "All Current")
(if
(not
(setq
res
(getkword
"\n[All/Current]apply pagesestup to which layout(s) <all>: ")))
(setq res "All")
)

(if (= "All" res)
(foreach x (layoutlist) (putPagesetup x page))
(putPagesetup (getvar "ctab") page)
)
(princ "\nFinished")
(princ)
)

--

-Jason
Member of the Autodesk Discussion Forum Moderator Program


"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message

news:734D07B9DC7EEEC6...@in.WebX.maYIadrTaRb...

Jason Piercey

unread,
May 19, 2003, 3:35:01 PM5/19/03
to
hold on! didn't think 'bout that.....

change this line


(setq page (strcase (getstring "\nspecify pagesetup to apply: ")))

to

(setq page (strcase (getstring T "\nspecify pagesetup to apply: ")))

and you are welcome.

--

-Jason
Member of the Autodesk Discussion Forum Moderator Program


"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message

news:D808CB62BD1B9F40...@in.WebX.maYIadrTaRb...
> Jason- this works great so far, thanks. I'll have to rename my Page Setups
> without spaces to work with the command line, but that's a small price ot
> pay considering all the time this will save. Thanks much-


Shawn McDonald

unread,
May 19, 2003, 3:26:20 PM5/19/03
to
Jason- this works great so far, thanks. I'll have to rename my Page Setups
without spaces to work with the command line, but that's a small price ot
pay considering all the time this will save. Thanks much-

Shawn McDonald


"Jason Piercey" <Jason@AtrEngDotCom> wrote in message

news:190F957D43AC24D4...@in.WebX.maYIadrTaRb...

Shawn McDonald

unread,
May 19, 2003, 4:09:01 PM5/19/03
to
Wow, even better- thanks!


"Jason Piercey" <Jason@AtrEngDotCom> wrote in message

news:8A7A5E70E1ED53A6...@in.WebX.maYIadrTaRb...

Jason Piercey

unread,
May 19, 2003, 4:16:13 PM5/19/03
to
Glad you checked back before renaming all those pagesetups :)

--

-Jason
Member of the Autodesk Discussion Forum Moderator Program


"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message

news:DF2542C9B92F2E27...@in.WebX.maYIadrTaRb...
> Wow, even better- thanks!

Trevor Coad

unread,
May 19, 2003, 5:43:55 PM5/19/03
to
I've had similar problems and found an easy solution using "FINEPRINT"
Fineprint is a kind of printer spool program, that you can define as the
standard printer.
Use pagesetup to print to the "FINEPRINT" printer which then catches the
files.
From fineprint then send the print file(s) to whichever printer you want.
The files can be saved and printed later if desired.

I downloaded a free trial version from the net and was so impressed I soon
registered.
http://www.fineprint.com/

"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message

news:DF2542C9B92F2E27...@in.WebX.maYIadrTaRb...

Martin Schmid

unread,
May 21, 2003, 8:16:04 AM5/21/03
to
Hmm... I never realized that batch plot didn't have a multiple copy
feature... which would be useful as I need to send 3 copies of a project to
plot this morning. Oh well...

Autodesk... has this feature been added since Acad2000, i.e., is it in 2004?

Thanks,
MS

"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message

news:66CF4D79E9FB02A7...@in.WebX.maYIadrTaRb...

Jason Piercey

unread,
May 21, 2003, 6:59:22 PM5/21/03
to
Keith,

I do not have LDD to test this with, but all works fine on
AutoCAD 2002. If you sepcify "Current" does it work?

Out of curiosity if you type in (layoutlist) at the command
line what is returned?

--

-Jason
Member of the Autodesk Discussion Forum Moderator Program


"keithbiggs" <kbi...@binnie.com> wrote in message news:f1647...@WebX.maYIadrTaRb...
> Jason:
> I cut and paste your code into a text file, saved it as "psetup.lsp". When I run it I encounter the following error:
>
> Command: PSETUP
>
> specify pagesetup to apply: TEMP
>
> [All/Current]apply pagesestup to which layout(s) : A
> ; error: Automation Error. Invalid object type
>
> BTW, I am using LDD R2 and do not have any experience with LISP coding.
>
> Thanks
>
> Keith
>
>


Keith Biggs

unread,
May 22, 2003, 3:50:23 PM5/22/03
to
Jason:

Yes, current does work. When I type (layoutlist) at the command line, the
named layouts are displayed at the command line as follows:

Command: (layoutlist)
("00-Cover" "01-SS1" "02-R1" "02-XS1" "03-XS2" "11 X 17 (Land) at 500"
"11x17
STM Management Plan" "Model")

Keith

"Jason Piercey" <discussio...@autodesk.com> wrote in message
news:EAD6E5312A5D55B5...@in.WebX.maYIadrTaRb...

Jason Piercey

unread,
May 22, 2003, 4:03:54 PM5/22/03
to
Try replacing this (near the bottom)

(foreach x (layoutlist) (putPagesetup x page))

with this

(foreach x (vl-remove "Model" (layoutlist)) (putPagesetup x page))


--

-Jason
Member of the Autodesk Discussion Forum Moderator Program


"Keith Biggs" <bur...@binnie.com> wrote in message
news:D415D3A8431217C0...@in.WebX.maYIadrTaRb...

Shawn McDonald

unread,
May 22, 2003, 5:23:11 PM5/22/03
to
An observation: "model" doesn't show up when I run "command: (layoutlist)"

Command: (layoutlist)
("4.2 Site" "5.2 SVS Locs" "5.3 GS Area" "5.5 SB Loc" "6.13 SVS VOC"
"6.14
SS Locs" "6.15 TPH Soil" "6.36 TPH GW" "6.5 CS Loc" "Site + Wells")

Could the presence of the "model" tab in layoutlist be throwing a wrench in
the works (for Keith), since a layout Page Setup can't be applied to Model
Space?

"Keith Biggs" <bur...@binnie.com> wrote in message
news:D415D3A8431217C0...@in.WebX.maYIadrTaRb...

Shawn McDonald

unread,
May 22, 2003, 5:28:53 PM5/22/03
to
Sorry Jason, I posted this then realized that's exactly what your fix did.

(I really need to learn LISP)

-Shawn


"Shawn McDonald" <smcd...@NOSPAMaspectconsulting.com> wrote in message

news:8BDF341C2940AB51...@in.WebX.maYIadrTaRb...

Keith Biggs

unread,
May 26, 2003, 3:26:12 PM5/26/03
to
Cool!

Thanks for the help.

Keith

"Jason Piercey" <Jason@AtrEngDotCom> wrote in message

news:D96DD0165A150410...@in.WebX.maYIadrTaRb...

Jason Piercey

unread,
May 26, 2003, 4:29:57 PM5/26/03
to
Glad it works for you.

--

-Jason
Member of the Autodesk Discussion Forum Moderator Program


"Keith Biggs" <bur...@binnie.com> wrote in message news:F3DA021A63F84E29...@in.WebX.maYIadrTaRb...

0 new messages