Hi guys
I work with laser cutting, someone have a macro to save an dxf file automaticaly?I think that with a macro that purge the layers, deletes all the layouts, delete all the dimensions anda save the drawing as dxf would be greate.
Unfortunaly i donĀ“t know to created this in autolisp and i would thank the help that everyone could give.
Thanks
Pedro Carvalho
Solved! Go to Solution.
Solved by CraigP_. Go to Solution.
This is what we use. It allows us to select objects and saves it to R12 dxf format.
Has no error checking though
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)
can you help me out please??
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)
)