Jump to content

Plot Range of PDFs


Recommended Posts

Hello there!

since you're so popular I need your help.

Here is my code and I need it to generate PDF only for it's job, like I have 50 pages and actually what I have here selects one page block (reads it's entity) and generates all the 50 pages, but I need to get PDF from like 25 of them not all of them! it needs to PDF ALL AT ONCE, page by page (with PDF Factory Pro Printer)

Here it is :

(defun c:epdf (/ ob ss bn mn mx)
(setq cnt 0)
(setq dir (getvar "dwgprefix"))
(and (progn
(initget "B")
(setq ob (entsel "\nSelect Block/B for blockname: "))
((eq ob "B")
(setq bn (getstring "\nEtner Block Name: "))
((and (eq (type ob) 'LIST)
(vlax-ename->vla-object (car ob))
(setq bn (cdr (assoc 2 (entget (car ob)))))
(tblsearch "BLOCK" bn)
ss (ssget "_X"
(list '(0 . "INSERT") '(410 . "Model") (cons 2 bn))

(vla-zoomextents (vlax-get-acad-object))
(repeat (setq i (sslength ss))
(setq ML "Material-List")
(setq cnt (1+ cnt))

(vlax-ename->vla-object (ssname ss (setq i (1- i))))
(command "plot"
"DWG To PDF.pc3"
"ANSI A (8.50 x 11.00 Inches)"
(trans (vlax-safearray->list mn) 0 1)
(trans (vlax-safearray->list mx) 0 1)
"As Displayed"
(strcat dir "ML-" (itoa cnt) "-" (getvar "dwgname"))
(command ".delay" "750")
(princ "\nNo Blocks Selected: ")

Link to comment
Share on other sites

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.

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