<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323193#M92924</link>
    <description>Try using:&lt;BR /&gt;
&lt;BR /&gt;
const MyStyle = "D:\ACAD2000\Plot Styles\DSM-iso.ctb"&lt;BR /&gt;
AcadPref.DefaultPlotStyleTable = MyStyle&lt;BR /&gt;
&lt;BR /&gt;
I know it's supposed to a read/write string value, but the help example shows&lt;BR /&gt;
it as a constant. Please post and let me know if it works.&lt;BR /&gt;
-Josh&lt;BR /&gt;
&lt;BR /&gt;
Rene van Kwawegen wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Hi all again,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I did not change much in my routine. I only placed the device name behind&lt;BR /&gt;
&amp;gt; the PlotToDevice.&lt;BR /&gt;
&amp;gt; I recieve a plot from the right printer so that is ok.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What does not work is the codeline with the plotstyle call.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     Dim AcadPref As AcadPreferencesOutput&lt;BR /&gt;
&amp;gt;     Set AcadPref = ThisDrawing.Application.Preferences.Output&lt;BR /&gt;
&amp;gt;     AcadPref.DefaultPlotStyleTable = "D:\ACAD2000\Plot Styles\DSM-iso.ctb"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I made a small routine to find the Plotstyle in use, that works fine, but&lt;BR /&gt;
&amp;gt; then I cannot use the&lt;BR /&gt;
&amp;gt; result to call the right "ctb". The code I found all over is only to change&lt;BR /&gt;
&amp;gt; the plotstyle in the A2K&lt;BR /&gt;
&amp;gt; options. That only works for new made drawings.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     Public Sub FindStyle()&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;         Dim StTable As Variant&lt;BR /&gt;
&amp;gt;         Dim StNr As Integer&lt;BR /&gt;
&amp;gt;         Dim StName As String&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;         ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo&lt;BR /&gt;
&amp;gt;         StTable = ThisDrawing.ActiveLayout.GetPlotStyleTableNames&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;         For StNr = LBound(StTable) To UBound(StTable)&lt;BR /&gt;
&amp;gt;             StName = StTable(StNr)&lt;BR /&gt;
&amp;gt;         Next StNr&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; TIA,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; René</description>
    <pubDate>Wed, 07 Jun 2000 22:43:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-06-07T22:43:50Z</dc:date>
    <item>
      <title>not the right result</title>
      <link>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323189#M92920</link>
      <description>to all,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to plot drawings that are sent to me from Thailand. For that I&lt;BR /&gt;
am using the next routine.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub dsmplot()&lt;BR /&gt;
Dim AcadPref As AcadPreferencesOutput&lt;BR /&gt;
Set AcadPref = ThisDrawing.Application.Preferences.Output&lt;BR /&gt;
&lt;BR /&gt;
If ThisDrawing.ActiveSpace = acPaperSpace Then&lt;BR /&gt;
    ThisDrawing.MSpace = True&lt;BR /&gt;
    ThisDrawing.ActiveSpace = acModelSpace&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
AcadPref.DefaultOutputDevice = "HP LaserJet 1100"&lt;BR /&gt;
AcadPref.DefaultPlotStyleTable = "D:\ACAD2000\Plot Styles\WML_pids_015.ctb"&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing.ModelSpace.Layout.PlotType = acExtents&lt;BR /&gt;
ThisDrawing.ModelSpace.Layout.StandardScale = acScaleToFit&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing.Plot.NumberOfCopies = 1&lt;BR /&gt;
ThisDrawing.Plot.PlotToDevice&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
the only problem is; " it doesn't work" . Is there somebody that can shine&lt;BR /&gt;
his/her light?&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
René</description>
      <pubDate>Tue, 06 Jun 2000 16:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323189#M92920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-06-06T16:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: not the right result</title>
      <link>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323190#M92921</link>
      <description>Rene,&lt;BR /&gt;
    At a quick glance, I'd say try changing your last line of code form:&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing.Plot.PlotToDevice&lt;BR /&gt;
&lt;BR /&gt;
to:&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing.Plot.PlotToDevice ThisDrawing.ActiveLayout.ConfigName&lt;BR /&gt;
&lt;BR /&gt;
Hopefully, this will do the trick, otherwise let me know the error message and&lt;BR /&gt;
where it's stalling out in the program.&lt;BR /&gt;
-Josh&lt;BR /&gt;
&lt;BR /&gt;
Rene van Kwawegen wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; to all,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I am trying to plot drawings that are sent to me from Thailand. For that I&lt;BR /&gt;
&amp;gt; am using the next routine.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Public Sub dsmplot()&lt;BR /&gt;
&amp;gt; Dim AcadPref As AcadPreferencesOutput&lt;BR /&gt;
&amp;gt; Set AcadPref = ThisDrawing.Application.Preferences.Output&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If ThisDrawing.ActiveSpace = acPaperSpace Then&lt;BR /&gt;
&amp;gt;     ThisDrawing.MSpace = True&lt;BR /&gt;
&amp;gt;     ThisDrawing.ActiveSpace = acModelSpace&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; AcadPref.DefaultOutputDevice = "HP LaserJet 1100"&lt;BR /&gt;
&amp;gt; AcadPref.DefaultPlotStyleTable = "D:\ACAD2000\Plot Styles\WML_pids_015.ctb"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ThisDrawing.ModelSpace.Layout.PlotType = acExtents&lt;BR /&gt;
&amp;gt; ThisDrawing.ModelSpace.Layout.StandardScale = acScaleToFit&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ThisDrawing.Plot.NumberOfCopies = 1&lt;BR /&gt;
&amp;gt; ThisDrawing.Plot.PlotToDevice&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; the only problem is; " it doesn't work" . Is there somebody that can shine&lt;BR /&gt;
&amp;gt; his/her light?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Regards,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; René</description>
      <pubDate>Tue, 06 Jun 2000 18:10:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323190#M92921</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-06-06T18:10:12Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323191#M92922</link>
      <description>Oops, almost forgot,&lt;BR /&gt;
    thisdrawing.activelayout.configname = "HP LaserJet 1100.pc3"&lt;BR /&gt;
-Josh&lt;BR /&gt;
&lt;BR /&gt;
Minkwitz Design wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Rene,&lt;BR /&gt;
&amp;gt;     At a quick glance, I'd say try changing your last line of code form:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ThisDrawing.Plot.PlotToDevice&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; to:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ThisDrawing.Plot.PlotToDevice ThisDrawing.ActiveLayout.ConfigName&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Hopefully, this will do the trick, otherwise let me know the error message and&lt;BR /&gt;
&amp;gt; where it's stalling out in the program.&lt;BR /&gt;
&amp;gt; -Josh&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Rene van Kwawegen wrote:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; to all,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I am trying to plot drawings that are sent to me from Thailand. For that I&lt;BR /&gt;
&amp;gt; &amp;gt; am using the next routine.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Public Sub dsmplot()&lt;BR /&gt;
&amp;gt; &amp;gt; Dim AcadPref As AcadPreferencesOutput&lt;BR /&gt;
&amp;gt; &amp;gt; Set AcadPref = ThisDrawing.Application.Preferences.Output&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; If ThisDrawing.ActiveSpace = acPaperSpace Then&lt;BR /&gt;
&amp;gt; &amp;gt;     ThisDrawing.MSpace = True&lt;BR /&gt;
&amp;gt; &amp;gt;     ThisDrawing.ActiveSpace = acModelSpace&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; AcadPref.DefaultOutputDevice = "HP LaserJet 1100"&lt;BR /&gt;
&amp;gt; &amp;gt; AcadPref.DefaultPlotStyleTable = "D:\ACAD2000\Plot Styles\WML_pids_015.ctb"&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; ThisDrawing.ModelSpace.Layout.PlotType = acExtents&lt;BR /&gt;
&amp;gt; &amp;gt; ThisDrawing.ModelSpace.Layout.StandardScale = acScaleToFit&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; ThisDrawing.Plot.NumberOfCopies = 1&lt;BR /&gt;
&amp;gt; &amp;gt; ThisDrawing.Plot.PlotToDevice&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; the only problem is; " it doesn't work" . Is there somebody that can shine&lt;BR /&gt;
&amp;gt; &amp;gt; his/her light?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Regards,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; René</description>
      <pubDate>Tue, 06 Jun 2000 18:13:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323191#M92922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-06-06T18:13:22Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323192#M92923</link>
      <description>Hi all again,&lt;BR /&gt;
&lt;BR /&gt;
I did not change much in my routine. I only placed the device name behind&lt;BR /&gt;
the PlotToDevice.&lt;BR /&gt;
I recieve a plot from the right printer so that is ok.&lt;BR /&gt;
&lt;BR /&gt;
What does not work is the codeline with the plotstyle call.&lt;BR /&gt;
&lt;BR /&gt;
    Dim AcadPref As AcadPreferencesOutput&lt;BR /&gt;
    Set AcadPref = ThisDrawing.Application.Preferences.Output&lt;BR /&gt;
    AcadPref.DefaultPlotStyleTable = "D:\ACAD2000\Plot Styles\DSM-iso.ctb"&lt;BR /&gt;
&lt;BR /&gt;
I made a small routine to find the Plotstyle in use, that works fine, but&lt;BR /&gt;
then I cannot use the&lt;BR /&gt;
result to call the right "ctb". The code I found all over is only to change&lt;BR /&gt;
the plotstyle in the A2K&lt;BR /&gt;
options. That only works for new made drawings.&lt;BR /&gt;
&lt;BR /&gt;
    Public Sub FindStyle()&lt;BR /&gt;
&lt;BR /&gt;
        Dim StTable As Variant&lt;BR /&gt;
        Dim StNr As Integer&lt;BR /&gt;
        Dim StName As String&lt;BR /&gt;
&lt;BR /&gt;
        ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo&lt;BR /&gt;
        StTable = ThisDrawing.ActiveLayout.GetPlotStyleTableNames&lt;BR /&gt;
&lt;BR /&gt;
        For StNr = LBound(StTable) To UBound(StTable)&lt;BR /&gt;
            StName = StTable(StNr)&lt;BR /&gt;
        Next StNr&lt;BR /&gt;
&lt;BR /&gt;
    End Sub&lt;BR /&gt;
&lt;BR /&gt;
TIA,&lt;BR /&gt;
&lt;BR /&gt;
René</description>
      <pubDate>Wed, 07 Jun 2000 17:40:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323192#M92923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-06-07T17:40:10Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323193#M92924</link>
      <description>Try using:&lt;BR /&gt;
&lt;BR /&gt;
const MyStyle = "D:\ACAD2000\Plot Styles\DSM-iso.ctb"&lt;BR /&gt;
AcadPref.DefaultPlotStyleTable = MyStyle&lt;BR /&gt;
&lt;BR /&gt;
I know it's supposed to a read/write string value, but the help example shows&lt;BR /&gt;
it as a constant. Please post and let me know if it works.&lt;BR /&gt;
-Josh&lt;BR /&gt;
&lt;BR /&gt;
Rene van Kwawegen wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Hi all again,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I did not change much in my routine. I only placed the device name behind&lt;BR /&gt;
&amp;gt; the PlotToDevice.&lt;BR /&gt;
&amp;gt; I recieve a plot from the right printer so that is ok.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What does not work is the codeline with the plotstyle call.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     Dim AcadPref As AcadPreferencesOutput&lt;BR /&gt;
&amp;gt;     Set AcadPref = ThisDrawing.Application.Preferences.Output&lt;BR /&gt;
&amp;gt;     AcadPref.DefaultPlotStyleTable = "D:\ACAD2000\Plot Styles\DSM-iso.ctb"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I made a small routine to find the Plotstyle in use, that works fine, but&lt;BR /&gt;
&amp;gt; then I cannot use the&lt;BR /&gt;
&amp;gt; result to call the right "ctb". The code I found all over is only to change&lt;BR /&gt;
&amp;gt; the plotstyle in the A2K&lt;BR /&gt;
&amp;gt; options. That only works for new made drawings.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     Public Sub FindStyle()&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;         Dim StTable As Variant&lt;BR /&gt;
&amp;gt;         Dim StNr As Integer&lt;BR /&gt;
&amp;gt;         Dim StName As String&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;         ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo&lt;BR /&gt;
&amp;gt;         StTable = ThisDrawing.ActiveLayout.GetPlotStyleTableNames&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;         For StNr = LBound(StTable) To UBound(StTable)&lt;BR /&gt;
&amp;gt;             StName = StTable(StNr)&lt;BR /&gt;
&amp;gt;         Next StNr&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; TIA,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; René</description>
      <pubDate>Wed, 07 Jun 2000 22:43:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/not-the-right-result/m-p/323193#M92924</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-06-07T22:43:50Z</dc:date>
    </item>
  </channel>
</rss>

