Error When Changing the StyleSheet

Error When Changing the StyleSheet

Anonymous
Not applicable
203 Views
1 Reply
Message 1 of 2

Error When Changing the StyleSheet

Anonymous
Not applicable
When I try to change the plot style to monochrome.ctb I get an run time error box come up telling me that this is an invalid input for the StyleSheet. Can anyone help?


Dim myApp As AcadApplication
Set myApp = CreateObject("Autocad.Application")
myApp.Documents.Open "C:\Reports\TPBH1.dwg"
myApp.ActiveDocument.ActiveLayout.StyleSheet = "monochrome.ctb"
myApp.ActiveDocument.Plot.PlotToDevice ("Acrobat Distiller")
Set myApp = Nothing
End Sub

Mike Hoar
0 Likes
204 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
That error will occur if 'None' is selected as the Plot device, even though
the drop down list shows the Style

--
Veign
www.veign.com
Code Samples & Sample Projects
http://www.veign.com/information/application/info_app.html
Submit Your Best Code (you keep the rights)
http://www.veign.com/information/application/code_submit.html
---------
"mikehoar" wrote in message
news:f0d2c5b.-1@WebX.maYIadrTaRb...
> When I try to change the plot style to monochrome.ctb I get an run time
error box come up telling me that this is an invalid input for the
StyleSheet. Can anyone help?
>
> Dim myApp As AcadApplication
> Set myApp = CreateObject("Autocad.Application")
> myApp.Documents.Open "C:\Reports\TPBH1.dwg"
> myApp.ActiveDocument.ActiveLayout.StyleSheet = "monochrome.ctb"
> myApp.ActiveDocument.Plot.PlotToDevice ("Acrobat Distiller")
> Set myApp = Nothing
> End Sub
>
> Mike Hoar
>
>
0 Likes