VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Who do you reassign the ACADLayout.StyleSheet ?

0 REPLIES 0
Reply
Message 1 of 1
speco_jim
148 Views, 0 Replies

Who do you reassign the ACADLayout.StyleSheet ?

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
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost