Results 1 to 2 of 2

Thread: vla-plottodevice and vla-SetLayoutsToPlot to PDF prevent pdf viewer launch

  1. #1
    I could stop if I wanted to pnorman's Avatar
    Join Date
    2005-02
    Location
    Calgary
    Posts
    203
    Login to Give a bone
    0

    Default vla-plottodevice and vla-SetLayoutsToPlot to PDF prevent pdf viewer launch

    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
    Last edited by pnorman; 2014-03-24 at 03:51 AM.

  2. #2
    I could stop if I wanted to pnorman's Avatar
    Join Date
    2005-02
    Location
    Calgary
    Posts
    203
    Login to Give a bone
    0

    Default Re: vla-plottodevice and vla-SetLayoutsToPlot to PDF prevent pdf viewer launch

    Found the simple answer, a rookie mistake, we all make them sometimes!?!
    Answer:
    Turn off "Open in PDF viewer when done" setting in the custom properties of the plotter set-up (pc3).
    http://www.cadforum.cz/cadforum_en/h...to-pdf-tip8501

Similar Threads

  1. Lost my .PDF viewer launch
    By Liamnacuac in forum AutoCAD General
    Replies: 3
    Last Post: 2009-07-28, 10:26 PM
  2. Replies: 2
    Last Post: 2006-11-27, 04:43 PM
  3. PlotToDevice w/AutoSpool
    By rwoodhall.111822 in forum VBA/COM Interop
    Replies: 9
    Last Post: 2006-06-09, 10:03 PM
  4. PlotToDevice Configuration override
    By hvydrp in forum VBA/COM Interop
    Replies: 2
    Last Post: 2005-06-07, 02:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •