gmmdinesh Posted January 15, 2017 Share Posted January 15, 2017 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. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 15, 2017 Share Posted January 15, 2017 Have you tried the PUBLISH command? Quote Link to comment Share on other sites More sharing options...
gmmdinesh Posted January 15, 2017 Author Share Posted January 15, 2017 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.. Quote Link to comment Share on other sites More sharing options...
maratovich Posted January 15, 2017 Share Posted January 15, 2017 Attach a sample file Quote Link to comment Share on other sites More sharing options...
Grrr Posted January 15, 2017 Share Posted January 15, 2017 You could start with something like this: (foreach layout (layoutlist) (command "_.PLOT" ... ) ) Quote Link to comment Share on other sites More sharing options...
gmmdinesh Posted January 15, 2017 Author Share Posted January 15, 2017 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. Quote Link to comment Share on other sites More sharing options...
Grrr Posted January 15, 2017 Share Posted January 15, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 16, 2017 Share Posted January 16, 2017 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 Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted January 16, 2017 Share Posted January 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
CAD_Noob Posted August 10, 2022 Share Posted August 10, 2022 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? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 11, 2022 Share Posted August 11, 2022 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" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.