Plot style help

Discussion in 'AutoCAD' started by Alejandro, Oct 14, 2004.

  1. Alejandro

    Alejandro Guest

    Hi,
    I am trying to set a pen setting for a drawing just before it gets
    plotted. I have tried the Developer Documentation, whose instructions are:

    ACADPref.DefaultPlotStyleTable = <path to ctb file>

    but this doesn't apply the style to the drawing at all (the drawing is
    plotted as if no styles had been applied.

    Is this clear enough, or should I provide more explanation? If anyone
    has any ideas, I would appreciate some help very much.

    Thanks,

    Alex
     
    Alejandro, Oct 14, 2004
    #1
  2. Without source code, its rather hard to determine your problem.

    For clarity:
    needs to include the filename as well [in case you didn't] and tell it to
    use plotstyles PlotWithPlotStyles = True

    You also need to call RefreshPlotDeviceInfo after you set it.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 14, 2004
    #2
  3. Alejandro

    Alejandro Guest

    Thanks for the info, but I still haven't had any success. Here is the
    code I am trying:

    Application.Preferences.Output.DefaultPlotStyleTable =
    "C:\ProgramFiles\Autodesk\MDT6\Plot Styles\monochrome.ctb"

    ThisDrawing.ModelSpace.Layout.RefreshPlotDeviceInfo
    ThisDrawing.ActiveLayout.PlotWithPlotStyles = True
    ThisDrawing.Plot.PlotToFile("C:\Drawings\Test.dwf", "C:\Program
    Files\Autodesk\MDT6\Plotters\PublishToWeb DWF.pc3")

    If I set the plot style manually, it is applied to the drawing as it
    plots, but this code plots out without applying the monochrome.ctb.

    Thanks,

    Alex

     
    Alejandro, Oct 14, 2004
    #3
  4. If I set the plot style manually, it is applied to the drawing as it
    That's because you are not applying it to the object you want to plot.
    You're setting things at the application level, the layout level and at
    model space [which may not be the activelayout since you didn't set it]

    WIth ThisDrawing.ActiveLayout
    .RefreshPlotDeviceInfo
    .ConfigName = "PublishToWeb DWF.pc3"
    .PlotWithPlotStyles = True
    .StyleSheet = "monochrome.ctb"
    .RefreshPlotDeviceInfo
    End With
    ThisDrawing.Plot.PlotToFile "C:\Drawings\Test.dwf"

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 14, 2004
    #4
  5. Alejandro

    Alejandro Guest

    Yep, that worked perfectly. I hadn't realized there was more than one
    level of settings, but I had a feeling that my trouble was because of
    unset settings.

    Thanks again,

    Alex

     
    Alejandro, Oct 14, 2004
    #5
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.