Never used them.They would make your life much easier. :) ..
Just trying to figure out why the dialog box keeps popping up and the newly created PDF file does to close once created. I guess its beyond what script file and lisp can do.
Thanks
;;; http://www.theswamp.org/index.php?topic=39461.0;all
;;; Lee-Mac
(defun c:2PDF ( / cm )
(vl-load-com)
(setq cm (getvar 'CMDECHO))
(setvar 'CMDECHO 0)
(command "_.-plot" "_y"
(if (= 1 (getvar 'TILEMODE)) "Model" (getvar 'CTAB))
"DWG To PDF.pc3" "ANSI full bleed B (11.00 x 17.00 Inches))"
"_I" "_L" "_N" "_E" "_F" "_C" "_Y" "monochrome.ctb" "_Y"
)
(if (= 1 (getvar 'TILEMODE))
(command "_A")
(command "_N" "_Y")
)
(command "_N" (strcat (getvar 'DWGPREFIX) (vl-filename-base (getvar 'DWGNAME))) "_Y" "_Y")
(setvar 'CMDECHO cm)
(princ)
)
(vl-load-com) (princ)
(setq CurrDwgName (getvar "dwgname"))
(setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName) 4)))
(setq name (strcat (getvar "DWGPREFIX") Fname ".pdf"))
;Command:
FILEDIA
;Enter new value for FILEDIA <1>:
0
;Command:
-PLOT
;Detailed plot configuration? [Yes/No] <No>:
Y
;Enter a layout name or [?] <Model>:
;Enter an output device name or [?] <None>:
DWG To PDF.pc3
;Enter paper size or [?] <ANSI A (11.00 x 8.50 Inches)>:
ANSI full bleed B (11.00 x 17.00 Inches)
;Enter paper units [Inches/Millimeters] <Inches>:
Inches
;Enter drawing orientation [Portrait/Landscape] <Portrait>:
Landscape
;Plot upside down? [Yes/No] <No>:
No
;Enter plot area [Display/Extents/Layout/View/Window] <Display>:
e
;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <Fit>:
f
;Enter plot offset (x,y) or [Center] <0.00,0.00>:
C
;Plot with plot styles? [Yes/No] <Yes>:
Yes
;Enter plot style table name or [?] (enter . for none) <>:
monochrome.ctb
;Plot with lineweights? [Yes/No] <Yes>:
Y
;Plot Scale lineweights with plot scale? <No>
;Plot paper space first? <No>
;Hide paper space objects? <No>
;Enter file name <Something.pdf>:
!name
;Save changes to page setup? Or set shade plot quality? [Yes/No/Quality] <N>:
No
;Proceed with plot [Yes/No] <Y>:
Yes
;Command:
FILEDIA
;;;Enter new value for FILEDIA <1>:
1
;; Prints All Layout Tabs and names the new PDFs with the name of the
;; drawing followed by the layout tab name.
;;
;; Adjust the paper size and .ctb file as needed.
;;
;; The PDFs will be placed in the folder where the drawing resides
;;
(defun c:PA ()
(foreach lay (layoutlist)
(setvar 'CTab lay)
(COMMAND "-PLOT"
"Y"
""
"DWG To PDF.pc3"
"ANSI full bleed B (11.00 x 17.00 Inches)"
"Inches"
"Landscape"
"N"
"E"
"f"
"C"
"Y"
"monochrome.ctb"
"Y"
"N"
"N"
"N"
""; Name of file
"N"
"y" )
)
)
Thanks guys.IMO .. You should really look into Sheet Set manager or Publish. Sheet set manager came out in 2005 and I haven't plotted with a script since :)
Still cannot get the Adobe dialog box not to come up. I have been unsuccessful in finding the setting in Adobe, if it exists.
Thanks
... If you'd like further instruction on doing this let me know.Yes - I'm interested on this method. Maybe you can create a Screencast?
;DESCRIPTION:PDFPlot
;***************************
(vl-load-com)
(defun ARCH:PlotToFilePathSet (/ *acad prefs pprefs)
(setq *acad (vlax-get-acad-object))
(setq prefs (vla-get-preferences *acad))
(setq pprefs (vla-get-output prefs))
(vla-put-DefaultPlotToFilePath pprefs (getvar "dwgprefix"))
)
(defun ARCH:PlotToFilePathGet ()
(vla-get-DefaultPlotToFilePath
(vla-get-output
(vla-get-preferences (vlax-get-acad-object))
)
)
)
;;(command "-psetupin" (strcat ARCH#CSTF "Acad.dwt") "*")
;;(vla-put-DefaultPlotToFilePath
;; (vla-get-Output (vla-get-Preferences (vlax-get-acad-object)))
;; (getvar "dwgprefix");;"E:\\Plot"
;; )
;;(getenv "PlotToFilePath")(setenv "PlotToFilePath" "E:\\Plot")
;;(getenv "PlotToFilePath")
;;(setenv "PlotToFilePath" "C:\\Arch_Custom\\PDF")
(ARCH:PlotToFilePathSet)
(vlax-for
layout (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
(setq name (vla-get-name layout))
(progn (if (= name "FullSize")
(vla-put-name layout ".")) ))
;;(setq CurrDwgName (getvar "dwgname"))
;;(setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName) 4)))
;;(setq name (strcat (getvar "DWGPREFIX") Fname ".pdf"))
(command ".qsave")
(command ".zoom" "e" "limits" "off")
;;(command ".plot" "y" "fullsize" "Adobe PDF.pc3" "Arch D" "i" "l" "n" "w" "0,0" "36,24" "f" "center" "y" "aia standard.ctb" "y" "y" "n" "n" "n" "n" "y")
(command ".plot" "y" "." "Adobe PDF.pc3" "Arch D" "i" "l" "n" "w" "0,0" "36,24" "f" "center" "y" "aia standard.ctb" "y" "y" "n" "n" "n" "n" "y")
(vlax-for
layout (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
(setq name (vla-get-name layout))
(progn (if (= name ".")
(vla-put-name layout "FullSize"))
))
SDI 1
(setvar "FILEDIA" 0)
_.open "F:\Jobs\2013\131020\acad\A10-01.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
_.open "F:\Jobs\2013\131020\acad\A10-02.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
_.open "F:\Jobs\2013\131020\acad\A10-03.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
_.open "F:\Jobs\2013\131020\acad\A10-04.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
_.open "F:\Jobs\2013\131020\acad\A10-05.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
_.open "F:\Jobs\2013\131020\acad\A10-06.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
_.open "F:\Jobs\2013\131020\acad\A10-07.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
_.open "F:\Jobs\2013\131020\acad\A10-08.dwg"
(load "V:/ARCH/Custom_Architettura/PlotCFG/PDFPlot.lsp")
.qsave
_.close
(setvar "FILEDIA" 1)
SDI 0
(ARCH:BatchPlotMsg)
[\code]
Everything works now, except for saving the files to the current directory....I don't know the Adobe driver, but the other drivers I know (PDF Creator; PDF XChange) handles nearly everything outside of AutoCAD (e.g. the dialogue). In many cases there is an extra dialogue / ini setting / registry setting which handles this. There are drivers which can be set to the default "use the path of the document" - and have problems if the the software does not pass the path to the driver. For me, I modify the saving-path via registry settings inside my Lisp.