Multi Layouts to one PDF

Multi Layouts to one PDF

Anonymous
Not applicable
1,355 Views
1 Reply
Message 1 of 2

Multi Layouts to one PDF

Anonymous
Not applicable

So I created this program with some help from many on this site.  It does exactly what I want.  Gets Layout Tabs names, checks to see if "Sheet1" is there, if so created several PDFs for each layout tab, if layout tab is not named "sheet1" it creates one PDF for Layout1 tab.  The group requesting this has come back to me and was wondering if the routine can print all layout tabs with "Sheet" to one PDF with several pages instead of several PDFs.

I saw a few other post but they seem to be in a different direction,  Any help would be much appreciated.

 

For this to work the layout tabs need to be Sheet1, Sheet2, Sheet3, etc..

 


(defun c:massplot ()


;Gets layout name
(Setq laynm (vla-get-name (vla-get-ActiveLayout(vla-get-ActiveDocument(vlax-get-acad-object)))))

 

 (if
     (or
        ;checks to see if layout name is the word sheet1
  (= laynm "Sheet1")
  
     );or
  ;Multiplot    
  (progn
                (foreach lay (layoutlist)
    (setvar 'CTab lay)
     (COMMAND "-PLOT" "Y" "" "DWG To PDF.pc3" "ANSI B (11.00 x 17.00 Inches)" "Inches" "Landscape" "No" "Extents" "Fit" "Center" "Yes" "monochrome.ctb" "Y" "N" "N" "N" "" "N" "y")
      )

  ;returns to sheet1
  (command "layout" "set" "Sheet1")

      )
              ;Single plot
   (command "-plot" "Y" "" "DWG To PDF.pc3" "ANSI B (11.00 x 17.00 Inches)" "Inches" "Landscape" "No" "Extents" "Fit" "Center" "Yes" "monochrome.ctb" "Y" "N" "N" "N" "" "N" "y")


 );if

(princ)

);End

 

 

AutoCAD Mechanical 2015

 

 

0 Likes
1,356 Views
1 Reply
Reply (1)
Message 2 of 2

cadffm
Consultant
Consultant
Two (or three) Ways, but i am not sure if this short answer can help you.

1. Using an other 3.part PDF Driver which can can create Multipage PDF and you can access in commandline Version.

2. Use autopublish as workaround

3. Use Publish, before yoj have to create a DSD File by Lisp (DSD is a Ascii Fileformat)

Number 3 is the easiest Solution.

4. Create single PDF and use an external commandline Tool for merge the Files to one PDF.

Sebastian

0 Likes