Search the Community
Showing results for tags 'pagesetup'.
-
LISP FOR PDF CONVERT MULTI DRAWING IN MODEL BY USING PAGESETUP
SANTHOSH_PSK posted a topic in AutoLISP, Visual LISP & DCL
Dear Team, Greetings..! I have multiple drawings in one .dwg file in Model (Ref. UNIT 4500.JPG file). I need to covert PDF's with help of "Page Setup Name" Each name Plot area selected. (Ref. Page Setup.jpg file). the converted pdf file with name of same as Page setup name & automatically saved in WRT to Unit path.(Ref. Path.JPG) Kindly help me out I have hundreds of drawing to covert every time of small correction..!!- 3 replies
-
- file path
- multiple drawings
- (and 4 more)
-
I've been reading through this detailed thread http://www.cadtutor.net/forum/showpost.php?p=271362&postcount=8 Well... I grabbed one of the snippets of code from the thread referenced above. It works perfectly. I deleted this.. ;; (vl-cmdf "_.pasteclip" "0,0") Since Lee Mac didn't know why it was in there in the first place. It does a very bad thing if anything is on your clipboard!! :-\ My question is how do I assign the "model space" setup to model space? It is called "11x17 Model Space" I'm one step away... :-| (defun c:PJM (/ *error* AT:PageSetups SetPSAllLayouts vl ov) (vl-load-com) (defun *error* (msg) (and ov (mapcar 'setvar vl ov)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ)) (setq *acad* (cond (*acad*) ((vlax-get-acad-object))) *doc* (cond (*doc) ((vla-get-ActiveDocument *acad*)))) ;;; Insert all Page Setups into drawing (will overwrite if exists) ;;; #DrawingFile - name of DWG file from which to import ;;; Alan J. Thompson, 07.29.09 (defun AT:PageSetups (#layout1) (if (findfile #layout1) (progn (command "_.psetupin" (findfile #layout1) "*") (while (wcmatch (getvar "cmdnames") "*PSETUPIN*") (command "_yes")) T))) (defun SetPSAllLayouts (setup / doc) (if (not (vl-catch-all-error-p (setq setup (vl-catch-all-apply (function vla-item) (list (vla-get-PlotConfigurations (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))) setup))))) (vlax-map-collection (vla-get-layouts doc) (function (lambda (x) (if (eq :vlax-false (vla-get-Modeltype x)) (vla-CopyFrom x setup))))))) (setq vl '("CMDECHO" "OSMODE") ov (mapcar 'getvar vl)) (mapcar 'setvar vl '(0 0)) ;; ------------ Start Here ----------------------------- (AT:PageSetups "H:\\Publish Setups.dwg") ;; Change this if necessary (repeat 3 (vla-purgeall *doc*)) (setPSAllLayouts "RP BORDER") (vla-ZoomExtents *acad*) (if (eq "" (vla-get-FullName *doc*)) (vla-saveas *doc* (strcat (vla-get-Path *doc*) "\\" (vla-get-name *doc*))) (vla-save *doc*)) ;; ------------ End Here ----------------------------- (mapcar 'setvar vl ov) (princ)) PLEASE HELP!!