Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Active Member
JohnAlex
Posts: 10
Registered: ‎05-17-2002
Message 1 of 15 (92 Views)

Plot all layouts using Script

92 Views, 14 Replies
06-20-2001 06:34 AM
We use script routines for all our printing. Is there a way of selecting all of the layouts on a drawing using script so that they can be printed.
Thanks in advance.
John
*Upton, Brent
Message 2 of 15 (92 Views)

Re: Plot all layouts using Script

06-20-2001 06:34 AM in reply to: JohnAlex
Isn't there a check box in the plot dialog to plot
all layouts?


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
We
use script routines for all our printing. Is there a way of selecting all of
the layouts on a drawing using script so that they can be printed.
Thanks
in advance.
John
*Piercey, Jason
Message 3 of 15 (92 Views)

Re:

06-20-2001 06:41 AM in reply to: JohnAlex
That doesn't help when you are using a script. Script files are all
command line.

-Jason

Brent Upton wrote:
>
> Isn't there a check box in the plot dialog to plot all layouts?
>
> JohnAlex wrote in message
> news:f05d048.-1@WebX.maYIadrTaRb...
> We use script routines for all our printing. Is there a way
> of selecting all of the layouts on a drawing using script so
> that they can be printed.
> Thanks in advance.
> John
*ca, sundog
Message 4 of 15 (92 Views)

Re: Plot all layouts using Script

06-20-2001 09:16 AM in reply to: JohnAlex
John:

 

How about just copying and pasting the whole mess
to the end of the file and changing the Layout part of the script for each
layout.  I do that in my sets since it seems every sheet requires some
goofy personal set up items. 

 

Or, could one select more than one layout in that
place?  I don't know. . One may

 

;;example below

 -PLOT
YES

;Following is layout selected.
L-1-LP1
HP
DeskJet 1220C Printer
Tabloid (11 x 17 in.)
Inches
etc. 

 

Good luck, let us know out here in cyber space what
you find.

 

Matt Fridell

saladays@gwtc.net


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
We
use script routines for all our printing. Is there a way of selecting all of
the layouts on a drawing using script so that they can be printed.
Thanks
in advance.
John
*Broad, Doug
Message 5 of 15 (92 Views)

Re: Plot all layouts using Script

06-20-2001 10:18 AM in reply to: JohnAlex
Possible strategy

1.  Make sure prior to plotting that you have used pagesetup on each
layout to get the settings right.  This simplifies each plot task.

2.  Have the script call the following function

 

;Function to plot all tabs in a drawing
;To work correctly, each tab
must have had PAGESETUP performed prior to
;calling plotalltab
;To plot
all layouts including model space (plotalltab t)
;To plot just paperspace
layouts (plotall nil)

 

(defun plotalltab ( model / n l) ;DC Broad 6-20-01  For A2K
 
(setq l (layoutlist))
  (setq l (if model (cons "model" l) l))
 
(foreach n l
   (command "-plot" "yes" n )
   
;and adapting some code posted earlier today to allow for a variable number of
returns
  (while (= (logand (getvar "CMDACTIVE") 1)
1)
    (command "") ;pagesetup must have been performed
or this is pot luck.
  ) ;_ end while
);end foreach
);end
plotalltab

Hope that helps.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
We
use script routines for all our printing. Is there a way of selecting all of
the layouts on a drawing using script so that they can be printed.
Thanks
in advance.
John
*S., Eric
Message 6 of 15 (92 Views)

Re:

06-21-2001 01:54 AM in reply to: JohnAlex
How about this in your script:

(foreach tab (vl-remove "Model" (layoutlist))
(setvar "ctab" tab)
(command "-plot" etc. etc...)
)
--

Regards,
Eric S.
eschneider@jensenprecast.com
*Broad, Doug
Message 7 of 15 (92 Views)

Re:

06-21-2001 05:20 AM in reply to: JohnAlex
Don't think you need vl-remove. Since (layoutlist) doesn't include "model"
in the list but you pointed out a major flaw in mine. OOPS! A revision
follows.

;Function to plot all tabs in a drawing
;To work correctly, each tab must have had PAGESETUP performed prior to
;calling plotalltab
;To plot all layouts including model space (plotalltab t)
;To plot just paperspace layouts (plotall nil)

(defun plotalltab ( model / n l) ;DC Broad 6-20-01 For A2K
(setq l (layoutlist))
(setq l (if model (cons "model" l) l))
(foreach n l
(setvar "ctab" n) ;oops this was forgotten in first post.
(command "-plot" "yes" n )
;and adapting some code posted earlier today to allow for a variable
number of returns
(while (= (logand (getvar "CMDACTIVE") 1) 1)
(command "") ;pagesetup must have been performed or this is pot luck.
) ;_ end while
);end foreach
);end plotalltab

Thanks for spotting it Eric.
Doug Broad

"Eric S." wrote in message
news:1009A3770590A81D830C4260B6F245E3@in.WebX.maYIadrTaRb...
> How about this in your script:
>
> (foreach tab (vl-remove "Model" (layoutlist))
> (setvar "ctab" tab)
> (command "-plot" etc. etc...)
> )
> --
>
> Regards,
> Eric S.
> eschneider@jensenprecast.com
>
>
*Bell, R. Robert
Message 8 of 15 (92 Views)

Re:

06-21-2001 05:33 AM in reply to: JohnAlex
(layoutlist) _may_ return "Model" at times. It is a noted bug (at least here
in the ng).

--
http://www.acadx.com


"Doug Broad" wrote in message
news:FD033FE0BF2E45265B71820CAB101DA8@in.WebX.maYIadrTaRb...
| Don't think you need vl-remove. Since (layoutlist) doesn't include "model"
| in the list but you pointed out a major flaw in mine. OOPS! A revision
| follows.
*Broad, Doug
Message 9 of 15 (92 Views)

Re:

06-21-2001 06:00 AM in reply to: JohnAlex
Thanks for correcting me. I hadn't learned of that bug. Still new to
monitoring this NG. I tested (layoulist) several times last night and
today and during those tests it did not return "model." Wish the "noted"
bugs were a little more accessible.

"R. Robert Bell" wrote in message
news:99DE9DFDB1C4B82FC558275699E09D53@in.WebX.maYIadrTaRb...
> (layoutlist) _may_ return "Model" at times. It is a noted bug (at least
here
> in the ng).
>
*Bell, R. Robert
Message 10 of 15 (92 Views)

Re:

06-21-2001 06:48 AM in reply to: JohnAlex
It's quite alright. They may have even fixed it by A2k2.

--
http://www.acadx.com


"Doug Broad" wrote in message
news:CF835FB50DDAD2906B8C36ADB1783965@in.WebX.maYIadrTaRb...
| Thanks for correcting me. I hadn't learned of that bug. Still new to
| monitoring this NG. I tested (layoulist) several times last night and
| today and during those tests it did not return "model." Wish the "noted"
| bugs were a little more accessible.
|
| "R. Robert Bell" wrote in message
| news:99DE9DFDB1C4B82FC558275699E09D53@in.WebX.maYIadrTaRb...
| > (layoutlist) _may_ return "Model" at times. It is a noted bug (at least
| here
| > in the ng).
| >
|
|
|
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.