Jump to content

Recommended Posts

Posted

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)
(vl-load-com)
(setq cnt 0)
(setq dir (getvar "dwgprefix"))
(if
(and (progn
(initget "B")
(setq ob (entsel "\nSelect Block/B for blockname: "))
(cond
((eq ob "B")
(setq bn (getstring "\nEtner Block Name: "))
)
((and (eq (type ob) 'LIST)
(vlax-method-applicable-p
(vlax-ename->vla-object (car ob))
'getboundingbox
)
)
(setq bn (cdr (assoc 2 (entget (car ob)))))
)
)
)
(tblsearch "BLOCK" bn)
bn
(setq
ss (ssget "_X"
(list '(0 . "INSERT") '(410 . "Model") (cons 2 bn))
)
)
)


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

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

Posted (edited)

Admin needs to be moved to a new post. "Plot range of Pdf's"

 

This does possibly what you want and Maratovich has an excellent plot routine that has lots more functions than mine. Just search here.

 

Multi GETVALS.lspplotA3Pdfrange.lsp

Edited by BIGAL

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