API: Change active printer

Discussion in 'AutoCAD' started by CS, Feb 23, 2005.

  1. CS

    CS Guest

    I am attempting to change the active printer and then set the paper size to
    send to the printer what am I doing wrong

    AcadApplication.Visible = True
    ACADapp.Documents.Open FName3 & ".dwg"
    ACADapp.ZoomExtents
    ACADapp.ActiveDocument.ModelSpace.Layout.PlotWithPlotStyles
    = True
    Count = 1
    Set PlotConf =
    ACADapp.ActiveDocument.PlotConfigurations.Add("Black & White")

    PlotConf.ConfigName = "\\PLYMOUTH_PDC\HP Color Inkjet CP1700
    (Copy 2)"
    'when finished running this isn't set as the current
    printer.

    PlotConf.PlotType = acExtents
    PlotConf.StandardScale = acScaleToFit
    PlotConf.PlotWithPlotStyles = True
    PlotConf.CanonicalMediaName = "Letter (8.5 x 11 in.) " 'this
    like craps out

    PStyle = ACADapp.ActiveDocument.ModelSpace.Layout.StyleSheet

    If Not PStyle = "monochrome.ctb" Then
    ACADapp.ActiveDocument.ModelSpace.Layout.StyleSheet =
    "monochrome.ctb"
    End If

    ACADapp.ActiveDocument.Plot.NumberOfCopies = 1
    ACADapp.ActiveDocument.Plot.PlotToDevice "\\PLYMOUTH_PDC\HP
    Color Inkjet CP1700 (Copy 2)"
     
    CS, Feb 23, 2005
    #1
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.