BrianTFC Posted March 2, 2018 Share Posted March 2, 2018 Grrr, so how would that work in the above code by RLX? Thanks Brian Quote Link to comment Share on other sites More sharing options...
Grrr Posted March 2, 2018 Share Posted March 2, 2018 Grrr, so how would that work in the above code by RLX? Thanks Brian Just ask Rlx to implement it, he knows what to do. Quote Link to comment Share on other sites More sharing options...
rlx Posted March 2, 2018 Share Posted March 2, 2018 Just ask Rlx to implement it, he knows what to do. He might but he won't , not right now because one of the little terro's has become 10 years old today and opa has to give her the present she's been nagging me for the past year : an ox-board. Oh , thanks for the reminder , bandage for if (when) she fall's , hope someone gets that on film haha laters alligators , opa's gotta party right now :-) gr. opa-Rlx Quote Link to comment Share on other sites More sharing options...
Grrr Posted March 2, 2018 Share Posted March 2, 2018 one of the little terro's has become 10 years old today and opa has to give her the present she's been nagging me for the past year : an ox-board. Oh , thanks for the reminder , bandage for if (when) she fall's , hope someone gets that on film haha Ah, have fun and tell her to be careful with it. Witnessed an incident by some tourists on Sunny Beach that were driving this: ~20kmh+no helmet+hit on the sidewalk's edge = lots of blood and ambulance. Quote Link to comment Share on other sites More sharing options...
BrianTFC Posted March 2, 2018 Share Posted March 2, 2018 RLX, Well keep her safe Opa. Brian Quote Link to comment Share on other sites More sharing options...
rlx Posted March 2, 2018 Share Posted March 2, 2018 (edited) Terro was born with ox-board me think, she stepped on it and drove it straight away and even made a piroutte... Grrr , great code! gonna used it, Although I have with reason not let them install acrobat on my pc so every time someone came bugging me I could say , sorry , go to ... he has acrobat , me no acrobat have not... Even added a little Bigal in the code , thank you too... ok , the code itself , I kept it simple for the rest , no fancy dcl (yet) ;; created by Stefan BMR , Lee , Grrr , Bigal & a little bit of me... (defun c:plotview ( / acobj acdoc views view_list listbox pdf-target-folder pdf-merge-folder merged-pdf view-list) (vl-load-com) (setq acobj (vlax-get-acad-object) acdoc (vla-get-activedocument acobj) views (vla-get-views acdoc)) (vlax-for view views (setq view_list (cons (vla-get-name view) view_list))) (if (not (setq pdf-target-folder (getfolder "Select folder to save views"))) (setq pdf-target-folder (getvar 'dwgprefix))(setq pdf-target-folder (strcat pdf-target-folder "\\"))) ; added a little bit of BIGAl too (if (= (vl-file-directory-p (setq pdf-merge-folder (strcat pdf-target-folder "pdf\\"))) nil)(vl-mkdir pdf-merge-folder)) (setq view-list (LM:listbox "Select views to plot" view_list 1)) ; now for the merge part (cond ((not (vl-consp view-list)) (alert "No views to process")) ((or (null pdf-target-folder)(not (vl-file-directory-p pdf-target-folder))) (alert "Invalid pdf target folder")) ((or (null pdf-merge-folder)(not (vl-file-directory-p pdf-merge-folder))) (alert "Invalid pdf merge folder")) ( t (foreach view view-list (command "_plot" "_y" "Model" "DWG To PDF.pc3" "ARCH C (24.00 x 18.00 Inches)" "Inches" "Landscape" "No" "View" view "Fit" "Center" "Yes" "ICP.ctb" "Yes" "A" (strcat pdf-target-folder (vl-filename-base (getvar 'dwgname)) " - " view ".pdf") "No" "Yes")) (MergePDFs pdf-target-folder (setq merged-pdf (strcat pdf-merge-folder "mergedpdfs.pdf"))) (if (and merged-pdf (setq merged-pdf (findfile merged-pdf))) (shell_open merged-pdf)(alert "Merged pdf not created")) ) ) (princ) ) (defun shell_open ( target / shell result ) (if (and (setq target (findfile target)) (setq shell (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application"))) (progn (setq result (vl-catch-all-apply 'vlax-invoke (list shell 'open target))) (vlax-release-object shell)(not (vl-catch-all-error-p result))))) ;;Created by Lee Mac ;; bit - [int] 1=allow multiple; 2=return indexes ;; Returns: [lst] List of selected items/indexes, else nil (defun LM:listbox ( msg lst bit / dch des tmp rtn ) (cond ((not (and (setq tmp (vl-filename-mktemp nil nil ".dcl"))(setq des (open tmp "w")) (write-line (strcat "listbox:dialog{label=\"" msg "\";spacer;:list_box{key=\"list\";multiple_select=" (if (= 1 (logand 1 bit)) "true" "false") ";width=50;height=15;}spacer;ok_cancel;}" ) des) (not (close des))(< 0 (setq dch (load_dialog tmp)))(new_dialog "listbox" dch))) (prompt "\nError Loading List Box Dialog.")) (t (start_list "list") (foreach itm lst (add_list itm)) (end_list)(setq rtn (set_tile "list" "0")) (action_tile "list" "(setq rtn $value)") (setq rtn (if (= 1 (start_dialog)) (if (= 2 (logand 2 bit))(read (strcat "(" rtn ")")) (mapcar '(lambda ( x ) (nth x lst)) (read (strcat "(" rtn ")")))))))) (if (< 0 dch)(unload_dialog dch))(if (and tmp (setq tmp (findfile tmp))) (vl-file-delete tmp)) rtn ) (defun getfolder (msg / fl sh) (if (and (setq sh (vlax-create-object "Shell.Application"))(setq fl (vlax-invoke sh 'browseforfolder 0 msg 0 ""))) (setq fl (vlax-get-property (vlax-get-property fl 'self) 'path))(setq fl nil))(release_me (list sh)) fl) (defun release_me (lst) (mapcar '(lambda (x)(if (and (= 'vla-object (type x))(not (vlax-object-released-p x)))(vlax-release-object x))(set (quote x) nil)) lst)) ; written by Grrr - Really good!!!! (works only if you have acrobat on your pc) (defun MergePDFs (in out / *error* AcroApp L PD r) ; http://www.theswamp.org/index.php?topic=53974.msg586248#msg586248 (defun *error* (m) (and L (foreach x (mapcar 'car L) (vl-catch-all-apply 'vlax-invoke-method (list x 'Close)) (vl-catch-all-apply 'vlax-release-object (list x)) ) ) (and AcroApp (vl-catch-all-apply 'vlax-invoke-method (list AcroApp 'CloseAllDocs) ) (vl-catch-all-apply 'vlax-invoke-method (list AcroApp 'Exit) ) (vl-catch-all-apply 'vlax-release-object (list AcroApp)) ) ; and (gc) (gc) (and m (princ m)) (princ) ) ; defun *error* (and in out (or (setq AcroApp (vlax-get-or-create-object "AcroExch.App")) (prompt "\nUnable to interfere with Acrobat object.") ) (cond ((eq 'STR (type in)) ; folder provided (setq L ((lambda (pat / tmp) (if (setq tmp (vl-directory-files pat "*.pdf" 1)) (mapcar (function (lambda (x) (list (vlax-get-or-create-object "AcroExch.PDDoc") (strcat pat "\\" x) ) ) ) tmp ) ) ) in ) ) ) ((vl-consp in) ; list of .pdf filepaths'n'names provided (setq L (mapcar (function (lambda (x) (list (vlax-get-or-create-object "AcroExch.PDDoc") x) ) ) in ) ) ) ) ; cond (setq L (apply (function append) (mapcar (function (lambda (x) (if (eq :vlax-true (vlax-invoke-method (car x) 'Open (cond ((cadr x)) ("") ) ) ) (list (append x (list (vlax-invoke-method (car x) 'GetNumPages)) ) ) ) ) ) L ) ) ) (setq PD (caar L)) (progn (foreach x (cdr L) ; L - assoc list of (#<VLA-OBJECT> <FilePath> <PagesCount>) (if (eq :vlax-false (vlax-invoke-method PD 'InsertPages (1- (vlax-invoke PD 'GetNumPages)) (car x) 0 (caddr x) :vlax-true ) ) (prompt (strcat "\nCannot insert pages from \"" (cadr x) "\"") ) ) ) (or (eq :vlax-true (vlax-invoke-method PD 'Save 1 out)) ; 1 = PDSaveFull (prompt "\nCannot save the modified document") ) ; or ) ; progn (setq r (mapcar 'cdr L)) ) ; and (*error* nil) r ) added little bit more error checking on 3-3-18 not everybody will work in inches or have same plotstyle so here my own (millimeter) plot command : (command "-plot" "y" "Model" "DWG To PDF.pc3" "ISO A3 (420.00 x 297.00 MM)" "M" "Landscape" "No" "View" view "Fit" "Center" "Yes" "monochrome" "Yes" "As displayed" (strcat pdf-target-folder (vl-filename-base (getvar 'dwgname)) " - " view ".pdf") "No" "Yes")) gr.Rlx Edited March 4, 2018 by rlx Quote Link to comment Share on other sites More sharing options...
Grrr Posted March 2, 2018 Share Posted March 2, 2018 Terro was born with ox-board me think, she stepped on it and drove it straight away and even made a piroutte... Grrr , great code! gonna used it, Although I have with reason not let them install acrobat on my pc so every time someone came bugging me I could say , sorry , go to ... he has acrobat , me no acrobat have no... Thanks Rlx, glad you would use it - It was so annoying for me to use 3rd party software right after I plotted PDFs from ACAD. I wish there was a more default windows application to do this, but anyway I always have Acrobat on my PC. (and publish is not an option for me, because I'm custom-plotting like in your code). Quote Link to comment Share on other sites More sharing options...
rlx Posted March 2, 2018 Share Posted March 2, 2018 (edited) I know of the scripting possibilities that most windows applications have and I remember I used someting to plot or insert / attach all pdf's from a multipage pdf some time ago but never considered the option installing acrobat and use it to merge my pdf's Usually I would just mail the files or the link and let 'them' have all the fun. But I think I'm gonna use it in my batch appie. Have been to Sunny Beach once , like ten years ago. Also went to Sofia and Instanbull by bus. Since then me and the misses decided on future vacations not to make so many day trips any more haha. Anyways , thanx for the great code Grrr. Really usefull! gr. Rlx Edited March 3, 2018 by rlx Quote Link to comment Share on other sites More sharing options...
BrianTFC Posted March 7, 2018 Share Posted March 7, 2018 rlx, Thanks for putting it all together if the company I worked for would put Acrobat on our PC's it would be nice to try it out but we use PDF Complete for all of our PDF needs. It would cost to much to upgrade the computers that would find this beneficial. We will just have to keep doing it the old way. Thanks, Brian Quote Link to comment Share on other sites More sharing options...
rlx Posted March 7, 2018 Share Posted March 7, 2018 (edited) rlx, Thanks for putting it all together if the company I worked for would put Acrobat on our PC's it would be nice to try it out but we use PDF Complete for all of our PDF needs. It would cost to much to upgrade the computers that would find this beneficial. We will just have to keep doing it the old way. Thanks, Brian you're welcome of course. Maybe the links from post #19 can be an alternative for you? That is , if you are allowed to install freeware. At my work , no cd-rom , no usb , no webmail . no non-Ex certified phones , no freeware , no nothing... so I put in request for adobe creator. Don't know if it will be approved though other colleagues have it (I'm not sure if my boss likes me enough you know haha). And else , sorry boss , no merged pdf's , your decision... gr. Rlx Edited March 7, 2018 by rlx Quote Link to comment Share on other sites More sharing options...
Grrr Posted March 7, 2018 Share Posted March 7, 2018 I know of the scripting possibilities that most windows applications have and I remember I used someting to plot or insert / attach all pdf's from a multipage pdf some time ago Would be interesting what other application offers this functionality (to be honest, I'm fairly new to the scripting objects). attach all pdf's from a multipage pdf some time ago but never considered the option installing acrobat and use it to merge my pdf's I initally thought to use Photoshop for the pdf merging task, but I'm glad I avoided it - since when accessing its application object, the code actually runs the program itself. Also went to Sofia and Instanbull by bus. Since then me and the misses decided on future vacations not to make so many day trips any more haha. Ah, so you are familiar with our trippy, bumpy balkan roads - we just want autobahn like yours! BTW the MergePDFs shouldn't cause any problems if Acrobat is not installed, so it should only prompt: Unable to interfere with Acrobat object. So don't worry if its used in the main code. rlx, Thanks for putting it all together if the company I worked for would put Acrobat on our PC's it would be nice to try it out but we use PDF Complete for all of our PDF needs. It would cost to much to upgrade the computers that would find this beneficial. We will just have to keep doing it the old way. Thanks, Brian It looks like no one ever has been satisfied in this forum, despite the posted codes that save a ton of time.. "Thanks for but " Why do you need to upgrade all the computers, when just one is enough for the printing job? I think that if only one worker that uses this code would save the time and effort for the rest co-workers, and even he won't spend his energy by just doing this! Quote Link to comment Share on other sites More sharing options...
rlx Posted March 7, 2018 Share Posted March 7, 2018 took some digging but pdfcomplete seems to have command line options : http://www.informatik.com/manuals/Help_PDFCompleteCommandline.pdf gr.Rlx Quote Link to comment Share on other sites More sharing options...
rlx Posted March 7, 2018 Share Posted March 7, 2018 Ah, so you are familiar with our trippy, bumpy balkan roads - we just want autobahn like yours! yip , but if I want bumpy roads just going to Belgium is far enough haha. Also nice in Belgium are the locations of some of the road signs : In Holland they are placed befóre the exit , not after. That can lead to something like 'you have just passed (missed) exit number ... back to my music listening (smetana - die moldau , nice!) conducted by Karajan (who else) gr. Rlx Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 8, 2018 Share Posted March 8, 2018 Have a look at these combines pdfs. You need a copy of ghostscript the GSexe. The combine is the mergepdfs. plotA3Pdfrange2.lsp GETVALS3.lsp mergepdfs.lsp Quote Link to comment Share on other sites More sharing options...
BrianTFC Posted March 8, 2018 Share Posted March 8, 2018 Grrr, I've always appreciated all of the work done by everyone on this forum to make lives easier at the work place. The problem at my company is all of our computers are identical and if one person gets a new program then everyone gets a new program and they are stingy with the how much they spend to up grade, even trying to get GhostScript on our computer is impossible and its freeware. Thanks, Brian Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 9, 2018 Share Posted March 9, 2018 Its called the desk shuffle and the hidden usb. We had a total meltdown around 1000 pc's turn them all off NOW!!!! So even the hidden usb is a bit of a problem but I have a good relationship with our IT about installing new software and we have a work around arrangement. Maybe you just have to put together a case why you would like to use some FREE software. Ghostscript has been around a long time. It takes like 2 minutes to install. Happy to provide details about how we use it and the time savings to a private email. Yes I had to do 8 machines. Quote Link to comment Share on other sites More sharing options...
BrianTFC Posted March 13, 2018 Share Posted March 13, 2018 All, With the help of other lisp routines We have come up with a way to use Publish to make a multi page PDF without using a 3rd party program. Here it is for everyone to look at and use. It works and does what we want it to do but we haven't figured out how to delete the DWG files when it's done Publishing, so if some one could figure that out that would be great. (defun c:pdfpub (/ ob ss bn mn mx) ;; This was created by combining a multitude of different lisp routines by Lee Mac, RLX, Lee Ambrosius, Stephan BMR and howiez69 (vl-load-com) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) ;; Get the PlotConfigurations collection (setq plotCfgs (vla-get-PlotConfigurations doc)) ;; Check to see if the pagesetup already exists (setq plotCfg (vl-catch-all-apply 'vla-Item (list plotCfgs "PDFSetup"))) ;; If the page setup exists, the variable will be of type VLA-OBJECT (if (/= (type plotCfg) 'VLA-OBJECT) ;; Create a page setup for model or paper space accordingly (if (= (getvar "TILEMODE") 0) (setq plotCfg (vla-Add plotCfgs "PDFSetup" :vlax-false)) (setq plotCfg (vla-Add plotCfgs "PDFSetup" :vlax-true)) ) ) ;;(vla-put-Name plotCfg "PDFSetup") (vla-RefreshPlotDeviceInfo plotCfg) ;; Set the plot device (vla-put-ConfigName plotCfg "DWG To PDF.pc3") ;; Set the paper size (vla-put-CanonicalMediaName plotCfg "ARCH_full_bleed_C_(24.00_x_18.00_Inches)") ;; Set the plot units (inches, millimeters, pixels) (vla-put-PaperUnits plotCfg acInches) ;; Set what to plot ;; - If using acView, set the ViewToPlot property ;; - If using acWindow, call GetWindowToPlot (if (= (getvar "TILEMODE") 0) (progn (vla-put-PlotType plotCfg acLayout) ;; Set scale (vla-put-UseStandardScale plotCfg :vlax-true) (vla-put-StandardScale plotCfg ac1_1) ) (progn (vla-put-PlotType plotCfg acExtents) ;; Set scale (vla-put-UseStandardScale plotCfg :vlax-true) (vla-put-StandardScale plotCfg acScaleToFit) ) ) ;; Hide paperspace objects (vla-put-PlotHidden plotCfg :vlax-false) ;; Set the plot origin (setq origin (vlax-make-safearray vlax-vbDouble '(0 . 1))) (vlax-safearray-fill origin (list 0.5 0.5)) (vla-put-PlotOrigin plotCfg origin) ;; Set the plot rotation (vla-put-PlotRotation plotCfg ac0degrees) ;; Set viewport plot behavior (vla-put-PlotViewportBorders plotCfg :vlax-false) (vla-put-PlotViewportsFirst plotCfg :vlax-true) ;; Set lineweight behavior (vla-put-PlotWithLineweights plotCfg :vlax-true) (vla-put-ScaleLineweights plotCfg :vlax-true) ;; Set plot styles behavior (vla-put-PlotWithPlotStyles plotCfg :vlax-true) (vla-put-ShowPlotStyles plotCfg :vlax-true) ;; Center the plot on the page (if (= :vlax-false (vla-get-CenterPlot plotCfg)) (vla-put-CenterPlot plotCfg :vlax-true) ) (if (= (getvar "PSTYLEMODE") 0) (vla-put-StyleSheet plotCfg "acad.stb") (vla-put-StyleSheet plotCfg "TFC.ctb") ) ;; Assign the page setup to the current layout (vla-CopyFrom (vla-get-ActiveLayout doc) plotCfg) (vl-cmdf "UCS" "") (setq cnt 0) (if (not (setq folder (getfolder "Select folder to save views"))) (setq folder (getvar 'dwgprefix))(setq folder (strcat folder "\\"))) (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 cnt (1+ cnt)) (vla-getboundingbox (vlax-ename->vla-object (ssname ss (setq i (1- i)))) 'mn'mx) (setq tmp (ssget "_C" (trans (vlax-safearray->list mx) 0 1) (trans (vlax-safearray->list mn) 0 1))) (vl-cmdf "_.-wblock" (strcat folder (itoa cnt) "-" (vl-filename-base (getvar 'dwgname)) ".dwg") "" "0,0" tmp "") (command "oops") ) ) (princ "\nNo Blocks Selected: ") )(princ) (defun *error* ( msg ) (setvar "FILEDIA" OldFda) ;sets system variable FILEDIA back to original value (setvar "EXPERT" Save_Expert) ;sets system variable EXPERT back to original value (princ "error: ") (princ msg) (princ) ) (setq OldFda (getvar "FILEDIA")) ;reads current system variable FILEDIA value (setvar "FILEDIA" 0) ;sets FILEDIA to 0 so no dialog boxes popup (setq Save_Expert (getvar "EXPERT")) ;reads current system variable EXPERT value (setvar "EXPERT" 2) ;sets EXPERT to 2 so no dialog boxes popup (setvar "EXPERT" Save_Expert) ;sets system variable EXPERT back to original value (setq pathtxt (strcat folder "TEMP.DSD")) ;sets path for DSD file from current drawing saved location (setq file (open (strcat folder "TEMP.DSD") "w")) ;opens DSD file for writing ;**********START OF DSD FILE********** ;**********START HEADER********** (write-line "[DWF6Version]" file) (write-line "Ver=1" file) (write-line "[DWF6MinorVersion]" file) (write-line "MinorVer=1" file) ;**********END OF HEADER********** ;**********START OF LAYOUTS/DWG TO PLOT********** !!!repeat this section for each of your layouts or dwgs to plot (setq cnt2 0) (repeat (setq i2 (sslength ss)) (setq cnt2 (1+ cnt2)) (setq dname (strcat "[DWF6Sheet:PDF Sheet " (itoa cnt2) "]")) (write-line dname file) (write-line (strcat "DWG=" folder (itoa cnt2) "-" (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4)) ".dwg")file) (write-line "Layout=Model" file) ;layout to plot (write-line (strcat "OriginalSheetPath=" (strcat folder (itoa cnt2) "-" (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4))".dwg") )file) (write-line "Has Plot Port=0" file) (write-line "Has3DDWF=0" file) (setq i2 (1- i2)) ) ;**********END OF 'ONE' LAYOUT TO PLOT********** !!!repeat previous section for each of your layouts or dwgs to plot ;**********START OF DSD FOOTER********** (write-line "[Target]" file) (write-line "Type=6" file) ;change to "TYPE=6" for multiple output files, "TYPE=5" for single output file (write-line (strcat "DWF=" (strcat folder(substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4))".pdf") )file) (write-line (strcat "OUT="(strcat folder)) file) (write-line "PWD=" file) ;**********END OF DSD FOOTER********** ;**********END OF DSD FILE********** (close file) ;closes DSD file (command "_.delay" 2000) ;system delay before starting publish command so DSD file closes (command "-Publish" pathtxt ) ;start publish command with TEMP.DSD file just created (setvar "FILEDIA" OldFda) ;sets system variable FILEDIA back to original value (command "_.delay" 2000) ;system delay before deleting TEMP.DSD so publish routine has time to release it (vl-file-delete pathtxt) ;deletes TEMP.DSD file (princ) ) (defun getfolder (msg / fl sh) (if (and (setq sh (vlax-create-object "Shell.Application"))(setq fl (vlax-invoke sh 'browseforfolder 0 msg 0 ""))) (setq fl (vlax-get-property (vlax-get-property fl 'self) 'path))(setq fl nil))(release_me (list sh)) fl) (defun release_me (lst) (mapcar '(lambda (x)(if (and (= 'vla-object (type x))(not (vlax-object-released-p x)))(vlax-release-object x))(set (quote x) nil)) lst)) (princ) Thanks, Brian Quote Link to comment Share on other sites More sharing options...
rlx Posted March 13, 2018 Share Posted March 13, 2018 (edited) All, With the help of other lisp routines We have come up with a way to use Publish to make a multi page PDF without using a 3rd party program. Here it is for everyone to look at and use. It works and does what we want it to do but we haven't figured out how to delete the DWG files when it's done Publishing, so if some one could figure that out that would be great. Thanks, Brian you could try the following , but you must set the delay long enough for the publish command to finish (i think). Last lines of your code could look something like this : . . (vl-file-delete pathtxt);deletes TEMP.DSD file ; optional to wait until pub is finished (princ "\nPress any key to delete drawings")(grread) (mapcar '(lambda (x) (vl-file-delete (strcat folder x))) (vl-directory-files folder "*.dwg")) (princ) ) variable 'folder' was set previously when you used getfolder to select the output folder so you can recycle it. gr. Rlx Edited March 14, 2018 by rlx Quote Link to comment Share on other sites More sharing options...
BrianTFC Posted March 15, 2018 Share Posted March 15, 2018 Rlx, Thanks for your help on this, instead of setting a delay is it possible to find the PDF it creates in the same folder and then delete the dwg's in the folder? Thanks, Brian Quote Link to comment Share on other sites More sharing options...
rlx Posted March 15, 2018 Share Posted March 15, 2018 Rlx, Thanks for your help on this, instead of setting a delay is it possible to find the PDF it creates in the same folder and then delete the dwg's in the folder? Thanks, Brian Hi Brian, When publish creates the pfd it probably starts with and empty file , adding to it as it goes. So you would need a signal (reactor?) telling it has finished. There is a reactor in autocad that can tell a command has ended (:vlr-commandended) but I'm not sure this will work on publish. I did find this : https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-reactor-works-fine-but-what-about-publish/td-p/2978030 haven't checked it out yet gr .Rlx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.