System Printer message box?

Discussion in 'AutoCAD' started by ljb, Jul 17, 2003.

  1. ljb

    ljb Guest

    I need to plot a series of drawings from VB but every time I call the plot
    routine I get a message box "Windows System Printer..." with OK and Cancel.
    The plotter I'm going to use is defined and I call it from VB. How do I get
    around this message? My program cant run unattended because I have to hit OK
    on every drawing. It appears AutoCAD remembers the plotter last used with
    the drawing and it doesn't exist in our location.

    thanks
    LJB
     
    ljb, Jul 17, 2003
    #1
  2. ljb

    ljb Guest

    I need to plot a series of drawings from VB but every time I call the plot
    routine I get a message box "Windows System Printer..." with OK and Cancel.
    The plotter I'm going to use is defined and I call it from VB. How do I get
    around this message? My program cant run unattended because I have to hit OK
    on every drawing. It appears AutoCAD remembers the plotter last used with
    the drawing and it doesn't exist in our location.

    thanks
    LJB
     
    ljb, Jul 17, 2003
    #2
  3. ljb

    Norm Yuan Guest

    Plotting drawing is alway closely tied with printer setting, especially when
    you get drawing with Layout set up in drawing from other office.

    To do unattended batch plotting, you must do some pre-processing if the
    drawing's Layout/Plot setting is based on printer different from the one you
    are going to use:

    1. Your program examine Layout/PlotConfiguration in drawing, find matched
    settings on available printer, modifiy Layout/PlotConfiguration, then plot,
    so that you get basically the same plotting effect as original plot setting
    in drawing. You may want to restore original plot settings in drawing if it
    is modified.

    2. Create new Layout/Plot Configuration based on your plotting need,
    regardless what is the Layout/Plot setting in drawing.
     
    Norm Yuan, Jul 17, 2003
    #3
  4. ljb

    ljb Guest

    I think my problem was caused by using layout.RefreshPlotDeviceInfo before I
    made any plot device assignment to override the saved info. By moving it
    down in my code the problem went away. Thanks for the hint Norm.

    LJB
     
    ljb, Jul 17, 2003
    #4
  5. ljb

    ljb Guest

    I'm having trouble doing some of this. Sometimes AutoCAD 2000 won't let me
    set the ConfigName to a valid plotter before I do a RefreshPlotDeviceInfo.
    But calling RefreshPlotDeviceInfo when the drawing has an invalid plotter is
    exactly what causes the message box to halt the program until I clear it. It
    doesn't always happen but did on a dozen or so of the four thousand drawings
    I processed today. On the problem drawings trying to set ConfigName first
    stops VB with a runtime error something to do with "invalid property
    setting".
     
    ljb, Jul 18, 2003
    #5
  6. ljb

    Norm Yuan Guest

    Are you setting CongigName on a newly created PlotConfiguration object or on
    an existing one? I'd guess it should be OK with newly created
    PlotCOnfiguration object.
     
    Norm Yuan, Jul 19, 2003
    #6
  7. ljb

    ljb Guest

    I've discovered that if I start AutoCAD 2000 from my VB program I need
    to manually load the plot dialog on one drawing before I continue. If
    I start with a blank drawing, manually open the plot dialog and cancel
    the plot dialog then I can resume VB. If I don't do that once at the
    start then I can't set the ConfigName in VB code! After having done
    this once everything works fine. I can set the ConfigName on all
    remaining drawings without a problem. After setting the ConfigName to
    a valid plotter I can RefreshPlotDeviceInfo without a problem also.
     
    ljb, Jul 21, 2003
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.