liamdonnelly0209 Posted July 3, 2012 Posted July 3, 2012 Hi All. I was wondering if anyone knows of a tool or a way to basically, batch PDF multiple viewports or specific coordinates within a paper layout. I have an A0 drawing where i need a print of the A0 drawing, and multiple grids set to A4 then a Jpeg showing the full plan with the grids on. I have set up a script using the -plot command and set the Coordinates for each grid. However it is a bit slow and cumbersome to do this on multiple drawings. Does anyone know of a way to maybe either through a script or a lisp, to open a drawing. Find certain instances of a block or polyline and print (with certain parameters like include an outline of 10mm around the edge of the grid) and when it has no more blocks to search for, it saves, closes and opens next drawing to search and print? Any help is very much appreciated. Thanks Quote
BIGAL Posted July 4, 2012 Posted July 4, 2012 this can be changed for model or layout tabs and uses multiple block for location create a block sheet size on a no plot layer use array etc to create. ; printing multiple sheets in model space automatically ; by Bigal 2011 (PROMPT ".....PRINTING DRAWING TO plotter....") (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) (setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Your blockname here")(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" "" "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) Quote
liamdonnelly0209 Posted July 4, 2012 Author Posted July 4, 2012 Ah great thanks. So with this am i able to open a drawing, it searchs for the block ive named, it will then print each one consecutively (to a filename i can suggest?) to A4? what do i need to change to make this work? ive only recently been trying out lisps and scripts etc so still new to all this. Thanks Quote
BIGAL Posted July 4, 2012 Posted July 4, 2012 Tomorrow will paste pdf code link, you would need to do something like pdf name dwgname+view1 then dwgname+view2 if using layouts so much easier can use layout name+dwgname. You need to learn about scripts also very easy for this task. Wrong computer at moment building a new 1 Quote
liamdonnelly0209 Posted July 13, 2012 Author Posted July 13, 2012 Bigal... any change i could see the new code you were going to send please? Many Thanks Quote
BIGAL Posted July 14, 2012 Posted July 14, 2012 Can you post a dwg please you have asked for different ways to do it grids views titleblock ? Quote
hosyn Posted May 10, 2018 Posted May 10, 2018 Hi bigal I checked this code and get this error message: Command: PLOTT .....PRINTING DRAWING TO plotter.... error: bad argument type: lselsetp nil Cannot invoke (command) from *error* without prior call to (*push-error-using-command*). Converting (command) calls to (command-s) is recommended. Command: I want to use this code to plot directly Any block. Quote
maratovich Posted May 11, 2018 Posted May 11, 2018 hosyn Maybe this will help you:: https://www.kdmsoft.net/skleyka.html or that : https://www.kdmsoft.net/revers.html Quote
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.