Jump to content

A Simple Lisp: Plot, Select Printer, Plot Extents, Center the Plot, Click OK


Recommended Posts

Posted

I do this routine roughly a hundred and 183 thousand times a day and it just occurred to me...why not try to see if I can find a lisp for it so that I can do it with a simple command. Again these are the steps that I'm trying to achieve:

 

 

Plot, Select Printer, Paper Size (11x17), Plot Extents, Center the Plot, Click OK

 

 

Does anyone know of a Lisp that already exists for this type of function or a way of going about creating one?

 

 

For extra credit, all the same functions, but Print to PDF.

Would greatly appreciate any help with this. Thanks.

Posted

Have you ever used sheet set manager and defined pagesetups .. that would save you a ton of time.

Posted

That sounds moderately familiar...but then again I forget so many things. To the Google for a refresher!

Posted

Jim,

 

Modify this.

 

 

;;; PrintPDF1824
(defun c:pdf1824 (/ ss mn mx)
     (vl-load-com)
     (if (setq ss  (ssget "_:S:E" '((0 . "INSERT,LWPOLYLINE"))))
         (progn
 (vla-getboundingbox (vlax-ename->vla-object (ssname ss 0)) 'mn'mx)
   (command "plot" "yes" "model" "[color="red"]Your PDF[/color].pc3" "ARCH C (18 x 24 in)"
         "inches" "Landscape" "no" "Window"
         (trans (vlax-safearray->list mn) 0 1)
         (trans (vlax-safearray->list mx) 0 1)
         "fit" "center" "yes" "[color="red"]YOUR.ctb[/color]"  "yes" "no" "no" "yes" "yes")
               )
         )
     )

Posted

Jim,

 

Modify this one. this does multiple copies.

 

 

;;; Printpage24X18
(defun c:prp24 (/ ss mn mx)
     (vl-load-com)
(pltnum)
     (if (setq ss  (ssget "_:S:E" '((0 . "INSERT,LWPOLYLINE"))))
         (progn
 (vla-getboundingbox (vlax-ename->vla-object (ssname ss 0)) 'mn'mx)
   (repeat xplta (command "plot" "yes" "model" "[color="red"]Your.pc3[/color]" "18x24(ARCH C)"
         "inches" "LANDSCAPE" "no" "Window"
         (trans (vlax-safearray->list mn) 0 1)
         (trans (vlax-safearray->list mx) 0 1)
         "fit" "center" "yes" "[color="red"]Your.ctb[/color]"  "yes" "no" "no" "yes" "yes")
               )
         )
     )
  )
(defun pltnum ()
(setq numplt (getint "\nEnter Number of Plots <1>: "))
(if (= numplt nil) (setq xplt 1) (setq xplt numplt))
(if (<= xplt 15) (setq xplta xplt) (setq xplta 15))
) 

Posted

I think Maratovich is the winner, we have 3 preset via a menu colour pdf b-w etc all plot a range of layouts here is the pdf for your info, also plots single sheets but end using ghostscript joins the pdf's into one.

plotA3Pdfrange2.lsp

GETVALS3.lsp

Posted

Post a sample drawing of what you're trying to plot. I'd still bet that sheet sets would be your ticket.

Posted

That was more of a response than I was anticipating. Going to need a minute to run through these. Thanks.

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...