Who do you reassign the ACADLayout.StyleSheet ?

Discussion in 'AutoCAD' started by speco_jim, May 17, 2004.

  1. speco_jim

    speco_jim Guest

    Can someone help me reassign the .StyleSheet attribute of an object. When ever the

    ACADLayout.StyleSheet = StrStylSheet

    assignment runs, the program shuts down. I can msgbox the ACADLayout.StyleSheet and it does provide the correct default StyleSheet.

    Private Sub Send_DWF()

    Set ObjAcadDoc = ObjAcad.Documents.Open("file.dwg")
    Set ACADLayout = ObjAcadDoc.ActiveLayout
    StrStylSheet = "Black_White_Plot.ctb"
    PlotConfig = "DWF eView (optimized for viewing).pc3"

    msgbox ACADLayout.StyleSheet

    With ACADLayout
    .PlotType = acExtents
    .PlotRotation = ac90degrees
    .CenterPlot = True
    .StandardScale = acScaleToFit
    .StyleSheet = StrStylSheet ' The program dies on this line
    .PlotWithPlotStyles = True
    .RefreshPlotDeviceInfo
    End With

    ObjAcadDoc.Plot.PlotToDevice (PlotConfig)

    End Sub
     
    speco_jim, May 17, 2004
    #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.