Jump to content

Plot all layouts with one command


gmmdinesh

Recommended Posts

Hi Everyone.. I need help again..In my project have lots of different size layouts( A1,A2,A3 &A4 all layouts in one *.dwg file).I need a lisp for plot all layouts as per layout size with one command.

Can anyone help me.?

 

 

Thanks in advance.:)

Link to comment
Share on other sites

Hi..lee mac..

Thanks for your reply..

I have tried PUBLISHE command..but it initiate few settings for proceeded the process at every time. and also it takes lot of time to publishe all layouts... i need automatically plot all layouts witout any initiate settings.

 

Thanks again..:)

Link to comment
Share on other sites

Hi..Thank you so much for your reply..

FYI.

I have attached sample file. in this file have only four layouts.

But in actual file have minimum 20 layouts.

sample.dwg

 

Thanks again.:)

Link to comment
Share on other sites

This seems to be the simpliest way:

(defun C:test ( / cmd )
 (setq cmd (getvar 'cmdecho)) (setvar 'cmdecho 0)
 (foreach Layout (layoutlist)
   (command "_.-PLOT" 
     "No"                                        ; Detailed plot configuration? [Yes/No] <No>: No
     Layout                                      ; Enter a layout name or [?] <Layout1>:
     ""                                          ; Enter a page setup name
     "DWG To PDF.pc3"                            ; Enter an output device name or [?] <DWG To PDF.pc3>:
     (strcat (getvar "DWGPREFIX") Layout ".pdf") ; Directory to save
     "No"                                        ; save changes to page setup?
     "Yes"                                       ; proceed with plot?
   ); command
 ); foreach
 (setvar 'cmdecho cmd)
 (princ)
); defun C:test

For the detailed plot configuration check scottbolton's post in this thread.

  • Like 1
Link to comment
Share on other sites

Grr as Gmmdinesh implies different size layout title blocks, the code would need a check for the title block name and then the correct sheet size could be used. I would also suggest use a Window rather than layout a bit more reliable.

 

Grr just a bit of an add to the plot pdf same method this is plot pdf by sheet range rather than all.

 

Gmmdinesh you need to add a title block of some form to each layout so the size can be determined. Even a rectang as a block, this way can work out the two corners of the plot area. See the code example below, this is a A1 sheet plotted to a A3 sheet.

plotA3Pdfrange.lsp

getvals.lsp

Link to comment
Share on other sites

I have tried PUBLISHE command..but it initiate few settings for proceeded the process at every time. and also it takes lot of time to publishe all layouts... i need automatically plot all layouts witout any initiate settings.

 

 

I don't understand this -> "but it initiate few settings for proceeded the process at every time"

 

You also say "i need automatically plot all layouts witout any initiate settings" - but that is *exactly* what the Publish command does.

It prints layouts with no interaction from the user needed.

 

Same for publishing from the Sheet Set Manager.

Link to comment
Share on other sites

  • 5 years later...
On 1/16/2017 at 3:50 AM, Grrr said:

This seems to be the simpliest way:

 

(defun C:test ( / cmd )
 (setq cmd (getvar 'cmdecho)) (setvar 'cmdecho 0)
 (foreach Layout (layoutlist)
   (command "_.-PLOT" 
     "No"                                        ; Detailed plot configuration? [Yes/No] <No>: No
     Layout                                      ; Enter a layout name or [?] <Layout1>:
     ""                                          ; Enter a page setup name
     "DWG To PDF.pc3"                            ; Enter an output device name or [?] <DWG To PDF.pc3>:
     (strcat (getvar "DWGPREFIX") Layout ".pdf") ; Directory to save
     "No"                                        ; save changes to page setup?
     "Yes"                                       ; proceed with plot?
   ); command
 ); foreach
 (setvar 'cmdecho cmd)
 (princ)
); defun C:test
 

 

For the detailed plot configuration check scottbolton's post in this thread.

 

It's good but it is using the Layout Name as Filename.

can it use the actual filename instead?

 

 

Link to comment
Share on other sites

All sorts of output is possible based around dwg name, eg mydrawing-D01, mydrawing-D02 or layout names or or or, it really comes down to what you want in the way of a file name how can 88 layouts be just dwg name ? Well yes if using correct pdf writer or for me join individual pdfs into "dwgname-D01-D88"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...