Setting the the plot configuration

Discussion in 'AutoCAD' started by KingCAD, Jan 19, 2004.

  1. KingCAD

    KingCAD Guest

    I am using [ObjAcadDoc.Plot.PlotToDevice (PlotConfig)] (PlotConfig) is set to be the ".pc3" file, to create a ".dwf" file of the current drawing, but How can I assure that I use the correct ".ctb" file? In this case "Black_White.ctb" and that I am plotting to extents, scale to fit, and so forth?? I am attempting this in VB 6.0 but it's so similar to VBA that I am confident one of you can point me in the right direction.

    THANKS!

    Dave. K
     
    KingCAD, Jan 19, 2004
    #1
  2. KingCAD

    Joe Sutphin Guest

    Dave,

    Here is a snippet from one of my applications that may help you.

    Joe
    --
    With oLayout
    .StyleSheet = "acad.ctb"
    .PlotRotation = ac0degrees

    Select Case UCase(Size)
    Case "C"
    .ConfigName = "C:\Program Files\Autodesk\MDT6\Plotters\C Size Adobe
    PDF.pc3"
    ..
    ..
    ..
    End With





    to be the ".pc3" file, to create a ".dwf" file of the current drawing, but
    How can I assure that I use the correct ".ctb" file? In this case
    "Black_White.ctb" and that I am plotting to extents, scale to fit, and so
    forth?? I am attempting this in VB 6.0 but it's so similar to VBA that I am
    confident one of you can point me in the right direction.
     
    Joe Sutphin, Jan 19, 2004
    #2
  3. What Joe's code shows, but isn't explicitly stated, is that the pc3 only
    loads the physical plotter settings - all the rest is up to you to set.

    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 20, 2004
    #3
  4. KingCAD

    KingCAD Guest

    Okay, Can you tell me why this doesn't work??
    Set ACADLayout = ObjAcadDoc.ActiveLayout
    ACADLayout.PlotType = acExtents
    ACADLayout.PlotRotation = ac90degrees
    ACADLayout.CenterPlot = True
    ACADLayout.StandardScale = acScaleToFit
    ACADLayout.StyleSheet = StrStylSheet
    ACADLayout.RefreshPlotDeviceInfo
    it all works except for
    ACADLayout.StyleSheet = StrStylSheet
    this line kicks me out of the procedure an then continues running the next procedure. StrStylSheet is set to equal "Black_White Plot.ctb"
    What I am trying to do is to assure that the plot will be black and white and NOT color.Everything I can find leads me to believe that this should work, bUT??

    Thank You.

    Dave. K
     
    KingCAD, Jan 20, 2004
    #4
  5. Okay Dave, is it safe to assume that Black_White exists and is found?
    Have you tried using the full path name? Try renaming the file with NO
    space in it - AutoCAD has never liked spaces in any file names. Also you
    need to add the line I added below for the plotstyles to take effect.
    ACADLayout.PlotWithPlotStyles = True
     
    Mike Tuersley, Jan 21, 2004
    #5
  6. KingCAD

    KingCAD Guest

    Yes, I have tried all that, removed the space, included the path, added your line (good idea), completely changed the name, I still get kicked out unless I rem out that line and then I get a color plot. Could it have something to do with the active layout? I am actually plotting model space but when I try to use [Set ACADLayout = ObjAcadDoc.ModelSpace]
    I get errors and can't use the PlotType etc.. Also I am plotting to a file (.dwf) if that matters.
    I have to be missing something simple, but what??
    Thanks for the help.
    Dave. K
     
    KingCAD, Jan 21, 2004
    #6
  7. Can you send me a copy of the full code? You may have posted and I
    missed it.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 21, 2004
    #7
  8. KingCAD

    KingCAD Guest

    I have posted the "Sub" in the new thread. The entire code is large and in Vb 6.0, but if you like I will attempt to attatch it.

    Thanks

    Dave. K
     
    KingCAD, Jan 22, 2004
    #8
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.