How to set Plot Style Table in VBA?

How to set Plot Style Table in VBA?

Anonymous
Not applicable
1,124 Views
3 Replies
Message 1 of 4

How to set Plot Style Table in VBA?

Anonymous
Not applicable
Hiya,

How does one set the Plot Style Table to be used for plotting a layout? I cannot find any property in the
Layout object or AcadPlotConfiguration object where I can set this.

Any ideas?

Thanks,

Micah
0 Likes
1,125 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Try this:

Dim acadPref As AcadPreferences
Set acadPref = ThisDrawing.Application.preferences
If acadPref.Output.PlotPolicy = acPolicyLegacy Then
acadPref.Output.DefaultPlotStyleTable = "Acad.ctb"
ElseIf acadPref.Output.PlotPolicy = acPolicyNamed Then
acadPref.Output.DefaultPlotStyleTable = "Acad.stb"
' *** Next two only available when PlotPolicy = acPolicyNamed ***
acadPref.Output.DefaultPlotStyleForLayer = "Normal"
acadPref.Output.DefaultPlotStyleForObjects = "ByLayer"
End If

mnerren wrote:

> Hiya,
>
> How does one set the Plot Style Table to be used for plotting a layout? I cannot find any property in the
> Layout object or AcadPlotConfiguration object where I can set this.
>
> Any ideas?
>
> Thanks,
>
> Micah
0 Likes
Message 3 of 4

Anonymous
Not applicable
Look for the StyleSheet property in layout or plotconfiguration.
(Layout.StyleSheet = "Pensettings.ctb")

Martin

mnerren wrote in message ...
>
>Hiya,
>
>How does one set the Plot Style Table to be used for plotting a layout? I
cannot find any property in the
>Layout object or AcadPlotConfiguration object where I can set this.
>
>Any ideas?
>
>Thanks,
>
>Micah
0 Likes
Message 4 of 4

Anonymous
Not applicable
Hi there.

Man did You solve a BIG!!! problem for me.

Thanks a lot.

Steen Maigaard

Trevor Willmer skrev i meddelelsen <39174CE7.C86C55E2@columbiaeng.com>...
>Try this:
>
> Dim acadPref As AcadPreferences
> Set acadPref = ThisDrawing.Application.preferences
> If acadPref.Output.PlotPolicy = acPolicyLegacy Then
> acadPref.Output.DefaultPlotStyleTable = "Acad.ctb"
> ElseIf acadPref.Output.PlotPolicy = acPolicyNamed Then
> acadPref.Output.DefaultPlotStyleTable = "Acad.stb"
> ' *** Next two only available when PlotPolicy = acPolicyNamed ***
> acadPref.Output.DefaultPlotStyleForLayer = "Normal"
> acadPref.Output.DefaultPlotStyleForObjects = "ByLayer"
> End If
>
>mnerren wrote:
>
>> Hiya,
>>
>> How does one set the Plot Style Table to be used for plotting a layout? I
cannot find any property in the
>> Layout object or AcadPlotConfiguration object where I can set this.
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Micah
>
0 Likes