全部的
我需要一些关于工作中创建的PDF plot lisp的帮助,创建该lisp是为了将材料列表表PDF格式并将其放入源文件夹中,以表名作为文件名。我想知道是否有人可以帮助找出如何将页面合并在一起,以创建一个文件,一旦他们转换为PDF所有作为一个步骤。
- ;;;This is the lisp routine to Plot the material list to individual PDF files with the job name and the page number
- ;;;as is does in the Plot Material List button.
- ;;; plotpdf.lsp
- (defun c:PlotPDF (/ 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" "acad.ctb" "yes" "As Displayed" (strcat dir "ML-" (itoa cnt) "-"(getvar "dwgname")) "no" "yes" "yes" "yes")
- (command ".delay" "750")
- )
- )
- (princ "\nNo Blocks Selected: ")
- )(princ)
- )
谢谢
布瑞恩 |