I am using the code below to plot the layouts in a drawing to PDF. It works fine.
The problem is that after the PDF files are written the default system pdf viewer is being launched and I want to avoid that.
Is there a way to prevent the viewer from being launched?
Code:
(vla-SetLayoutsToPlot (vla-get-Plot (active-document)) (vlax-safearray-fill (vlax-make-safearray vlax-vbString '(0 . 1)) (layoutlist))) (vla-plottodevice (vla-get-Plot (active-document)))
If I use vla-plottodevice without vla-SetLayoutsToPlot it works fine, the viewer is not launched, however it will only plot the first layout, when I change to any subsequent layouts (with vla-put-activelayout) and call vla-plottodevice I get an error: Automation Error. Description was not provided.
So two options:
1. How do I prevent the system viewer app from launching when I use vla-SetLayoutsToPlot and vla-plottodevice?
2. How do I plot multiple layouts with multiple calls to vla-plottodevice?
(BACKGROUNDPLOT is set to 3)
It is as if the combination of vla-SetLayoutsToPlot followed by vla-plottodevice is forcing the plot to be done in the foreground which forces the system pdf viewer to launch?
Thanks