Results 1 to 5 of 5

Thread: LISP to batch plot multiple sheets in a single layout without creating views

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2014-07
    Posts
    1
    Login to Give a bone
    0

    Default LISP to batch plot multiple sheets in a single layout without creating views

    Awhile back I saw someone use this LISP routine that basically allows them to do a batch plot that requires very little time to setup.

    From what I can see, the routine does this, assuming it uses the default DWG to PDF.pc3 plot driver:

    1) Sets an output directory to that of the user's choice, if no choice is made it uses the default directory the drawing is in
    2) Click on the sheet numbers to represent each sheet in the layout to be plotted.
    3) Specify a paper size (existing paper sizes are fine, much like the commandline version of the -plot command)
    4) Specify a print area using a Window
    5) Output that file and name that PDF to match the sheet number it's printing
    6) The LISP would continuously loop and plot the next sheet to PDF for each sheet number that was selected in step 2. It would remember the paper size it used in step 3 and also remember the print area in Step 4.

    From what I can tell, the routine I saw can calculate the print area to use based off of a specific distance *relative* to the sheet number. The sheet number within a border in most drawings are static objects that are almost always located in the same part of the border and if the people who create the sheets are disciplined you can use that as an insertion point or a "calculation point" for the new sheets.

    What I also noticed is that if the sheet number position varies, the routine I saw lets you simply duplicate the sheet numbers outside the sheet and then set your own "basepoint" for plotting that way. The contents outside the sheet do not get plotted even when they do this.

    I am well aware there's other non-LISP ways to do this, create multiple layouts and just use one sheet per layout so that you can use a single Page Setup to publish, but all of this takes time to setup and some of the users I deal with are old school types that don't use multiple layouts, and this stuff requires a lot of *time* to set up.

    The LISP I saw lets you simply click a few sheet names, click a window, and then submit for plotting. Does something like this already exist? I don't want to reinvent the wheel if someone already went through the hassle of making a LISP like this.

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: LISP to batch plot multiple sheets in a single layout without creating views

    Here is a start for you, it looks for a title block Da1sht so you could just create a rectang save as a block that is the size of your sheet if you dont have a title block, place it around each area, a version 2 was look at the scale of the rectang when plotting.

    Code:
     ; Plot all titles in Modelspace
    ; By Big-Al 
    
    
    (PROMPT ".....PRINTING DRAWING TO plotter....")
    (setq oldsnap (getvar "osmode"))
    (setvar "osmode" 0)
     
    (setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Da1drsht")(410 . "Model"))))
    (setq n (sslength ss2))
    
    (setq index 0)
    (repeat n
        (setq en (ssname ss2 index))
        (setq el (entget en))
        (setq inspt (assoc 10 el)) ; insertion pt
    
       (setq xmin (- (cadr inspt) 6.0))
       (setq ymin (- (caddr inspt) 6.0))
       (setq xymin (strcat (rtos xmin 2 1) "," (rtos ymin 2 1)))
    
       (setq xmax (+ xmin 813.0)) ; hard coded for 813 wide 6mm offset
       (setq ymax (+ ymin 566.0)) ;hard code for 566 high
       (setq xymax (strcat (rtos xmax 2 1) "," (rtos ymax 2 1)))
    
    
      (COMMAND "-PLOT"  "Y"     "" "//PRODPRN01/Design-5100"
    	       "A3"	"M"     "LANDSCAPE"   "N"
    	       "W"	  xymin   xymax "1=2"  "C"
    	       "y"	  "Designlaser.ctb"      "Y"   ""	"n"   "n"
    	       "y"	
        )
       
      (setq index (+ index 1))
    
    )
    
    (setvar "osmode" oldsnap)
    (princ)

  3. #3
    Member
    Join Date
    2018-07
    Posts
    13
    Login to Give a bone
    0

    Default Re: LISP to batch plot multiple sheets in a single layout without creating views

    Maybe this will help:
    Revers -Automatic batch printing a multiple format

    - - - Updated - - -

    Maybe this will help:
    Revers -Automatic batch printing a multiple format
    https://www.kdmsoft.net/revers.html

  4. #4
    Woo! Hoo! my 1st post
    Join Date
    2020-03
    Posts
    1
    Login to Give a bone
    0

    Default Re: LISP to batch plot multiple sheets in a single layout without creating views

    It says "error:bad argument type" after loading the lisp. How can i fix this?

  5. #5
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: LISP to batch plot multiple sheets in a single layout without creating views

    Which program mine or the other ? You do need to change some code values in mine to match your dwg.

Similar Threads

  1. Plot a multiple windows in a single layout in pdf
    By jagdale763733040 in forum Dot Net API
    Replies: 0
    Last Post: 2016-08-30, 06:28 AM
  2. plot multiple views/layouts (batch plot)
    By tylyn539693 in forum AutoCAD Plotting
    Replies: 19
    Last Post: 2014-02-18, 07:08 PM
  3. Single Detail on multiple sheets
    By katysue in forum Revit - Platform
    Replies: 1
    Last Post: 2008-09-15, 10:33 PM
  4. Spread a single view across multiple sheets.
    By eric.anastas in forum Revit Architecture - General
    Replies: 5
    Last Post: 2006-11-10, 09:36 PM
  5. Batch Plot multiple sheets inside of one drawing file
    By willymoran2000 in forum AutoCAD Plotting
    Replies: 4
    Last Post: 2006-08-10, 08:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •