Hi,
I think that this is not a property, but rather a method. "Plot to file"
option can be activated once, when the plot dialog is opened, and after
clicking OK, the option is deactivated, so this does not keep as a
permanent configuration. Next time you have to specify again that you want
to plot to a file by selecting it and this makes me to believe that this is
a method, so in your LISP code you are going to configure it the way you
want it.
The methods you have to use are vla-plottofile when you want to plot to a
file and vla-plottodevice when (obviously) you want to plot to your plotting
device. The following code demonstrates how to use it.
;============================================
(defun c:PLOTTO ()
(initget "File Device")
(if
(not
(setq plot_target
(getkword "\nPrint to[File/]: ")
)
)
(setq plot_target "Device")
)
(plot_to plot_target)
)
;============================================
(defun plot_to (
plot_target
/
AcadApplication
ActiveDocument
PlotObject
)
(setq AcadApplication (vlax-get-acad-object))
(setq ActiveDocument
(vla-get-activedocument AcadApplication)
)
(setq PlotObject (vla-get-plot ActiveDocument))
(defun plot_to_file ( / plot_name configuration_name)
(setq plot_name
(strcat
(vl-filename-base
(vla-get-fullname ActiveDocument)
)
".dwf"
)
)
(setq configuration_name "DWF6 ePlot.pc3")
(vla-PlotToFile
PlotObject
plot_name
configuration_name ;;;if nil, the current config is used
)
)
(defun plot_to_device ( / configuration_name)
(setq configuration_name "Default Windows System Printer")
(vla-PlotToDevice
PlotObject
configuration_name ;;;if nil, the current config is used
)
)
(if (= (strcase plot_target "File"))
(plot_to_file)
(plot_to_device)
)
;no muffler here, it returns true or false
)
;==============================================
Hope it helps,
Constantin
a écrit dans le message de news: 5374540@discussion.autodesk.com...
Hi,
I am trying to write a lisp to simplify my plotting. Is there a way to see
if the current (active) pagesetup has the "plot to file" check box checked
or not. It would help a lot.