<?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: Setting Printing Path Problem in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/setting-printing-path-problem/m-p/1548058#M37097</link>
    <description>Here is the code....&lt;BR /&gt;
&lt;BR /&gt;
Private Sub AcadDocument_Activate()&lt;BR /&gt;
&lt;BR /&gt;
    Dim AcadPrefFiles As AcadPreferencesFiles&lt;BR /&gt;
    Dim strDefaultPath As String&lt;BR /&gt;
    Dim strDrawingPath As String&lt;BR /&gt;
    Dim strDrawingPathChar As String&lt;BR /&gt;
    Dim strProjCadd As String&lt;BR /&gt;
    Dim strPrinterPath As String&lt;BR /&gt;
    Dim varCounter As Variant&lt;BR /&gt;
    Dim varPathLen As Variant&lt;BR /&gt;
    Dim fso&lt;BR /&gt;
    &lt;BR /&gt;
    Set AcadPrefFiles = ThisDrawing.Application.preferences.Files&lt;BR /&gt;
    strDefaultPath = "Q:\AutoCAD 2006\General\Plotting"&lt;BR /&gt;
    strDrawingPath = ThisDrawing.Path &amp;amp; "\"&lt;BR /&gt;
    strProjCadd = "ProjectCadd\Plotting"&lt;BR /&gt;
    varCounter = Len(strDrawingPath)&lt;BR /&gt;
    Set fso = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;
    &lt;BR /&gt;
    Do While varCounter &amp;gt; 0&lt;BR /&gt;
    &lt;BR /&gt;
        strDrawingPath = Left(strDrawingPath, varCounter)&lt;BR /&gt;
        strDrawingPathChar = Right(strDrawingPath, 1)&lt;BR /&gt;
        varCounter = varCounter - 1&lt;BR /&gt;
        &lt;BR /&gt;
        If varCounter = 0 Then&lt;BR /&gt;
                AcadPrefFiles.PrinterStyleSheetPath = strDefaultPath&lt;BR /&gt;
                AcadPrefFiles.PrinterConfigPath = strDefaultPath&lt;BR /&gt;
                AcadPrefFiles.PrinterDescPath = strDefaultPath&lt;BR /&gt;
            ElseIf strDrawingPathChar = "\" Then&lt;BR /&gt;
                strPrinterPath = strDrawingPath &amp;amp; strProjCadd&lt;BR /&gt;
                If fso.FolderExists(strPrinterPath) Then&lt;BR /&gt;
                    AcadPrefFiles.PrinterStyleSheetPath = strPrinterPath&lt;BR /&gt;
                    AcadPrefFiles.PrinterConfigPath = strPrinterPath&lt;BR /&gt;
                    AcadPrefFiles.PrinterDescPath = strPrinterPath&lt;BR /&gt;
                    varCounter = 0&lt;BR /&gt;
                End If&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
    Loop&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
    <pubDate>Fri, 03 Feb 2006 17:58:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-02-03T17:58:08Z</dc:date>
    <item>
      <title>Setting Printing Path Problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/setting-printing-path-problem/m-p/1548056#M37095</link>
      <description>Everyone, &lt;BR /&gt;
&lt;BR /&gt;
I have created a VBA that sets the printing config paths (plotter, plot style...) and the application works and sets the paths correctly. The problem is even with the paths set correctly the plots and preview doesn't print or look correctly. It's like the pen table isn't being used where the plot should be all black it plots in degrees of gray. He is the kicker... to "fix" the problem I can simply open and Cancel the Opions dialog box without changing a thing, and the print or preview works perfect. Second, the "fix" works until I restart AutoCAD. We're using AutoCAD 2006, but had the same problem with 04. &lt;BR /&gt;
&lt;BR /&gt;
I'm pretty new to VBA so please be detailed if you can help. &lt;BR /&gt;
&lt;BR /&gt;
Thanks, Keith</description>
      <pubDate>Fri, 03 Feb 2006 17:37:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/setting-printing-path-problem/m-p/1548056#M37095</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-03T17:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Printing Path Problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/setting-printing-path-problem/m-p/1548057#M37096</link>
      <description>Keith,&lt;BR /&gt;
&lt;BR /&gt;
Post your code so we an see exactly what you are doing and try and help you.&lt;BR /&gt;
&lt;BR /&gt;
Maximo</description>
      <pubDate>Fri, 03 Feb 2006 17:55:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/setting-printing-path-problem/m-p/1548057#M37096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-03T17:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Printing Path Problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/setting-printing-path-problem/m-p/1548058#M37097</link>
      <description>Here is the code....&lt;BR /&gt;
&lt;BR /&gt;
Private Sub AcadDocument_Activate()&lt;BR /&gt;
&lt;BR /&gt;
    Dim AcadPrefFiles As AcadPreferencesFiles&lt;BR /&gt;
    Dim strDefaultPath As String&lt;BR /&gt;
    Dim strDrawingPath As String&lt;BR /&gt;
    Dim strDrawingPathChar As String&lt;BR /&gt;
    Dim strProjCadd As String&lt;BR /&gt;
    Dim strPrinterPath As String&lt;BR /&gt;
    Dim varCounter As Variant&lt;BR /&gt;
    Dim varPathLen As Variant&lt;BR /&gt;
    Dim fso&lt;BR /&gt;
    &lt;BR /&gt;
    Set AcadPrefFiles = ThisDrawing.Application.preferences.Files&lt;BR /&gt;
    strDefaultPath = "Q:\AutoCAD 2006\General\Plotting"&lt;BR /&gt;
    strDrawingPath = ThisDrawing.Path &amp;amp; "\"&lt;BR /&gt;
    strProjCadd = "ProjectCadd\Plotting"&lt;BR /&gt;
    varCounter = Len(strDrawingPath)&lt;BR /&gt;
    Set fso = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;
    &lt;BR /&gt;
    Do While varCounter &amp;gt; 0&lt;BR /&gt;
    &lt;BR /&gt;
        strDrawingPath = Left(strDrawingPath, varCounter)&lt;BR /&gt;
        strDrawingPathChar = Right(strDrawingPath, 1)&lt;BR /&gt;
        varCounter = varCounter - 1&lt;BR /&gt;
        &lt;BR /&gt;
        If varCounter = 0 Then&lt;BR /&gt;
                AcadPrefFiles.PrinterStyleSheetPath = strDefaultPath&lt;BR /&gt;
                AcadPrefFiles.PrinterConfigPath = strDefaultPath&lt;BR /&gt;
                AcadPrefFiles.PrinterDescPath = strDefaultPath&lt;BR /&gt;
            ElseIf strDrawingPathChar = "\" Then&lt;BR /&gt;
                strPrinterPath = strDrawingPath &amp;amp; strProjCadd&lt;BR /&gt;
                If fso.FolderExists(strPrinterPath) Then&lt;BR /&gt;
                    AcadPrefFiles.PrinterStyleSheetPath = strPrinterPath&lt;BR /&gt;
                    AcadPrefFiles.PrinterConfigPath = strPrinterPath&lt;BR /&gt;
                    AcadPrefFiles.PrinterDescPath = strPrinterPath&lt;BR /&gt;
                    varCounter = 0&lt;BR /&gt;
                End If&lt;BR /&gt;
        End If&lt;BR /&gt;
        &lt;BR /&gt;
    Loop&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
      <pubDate>Fri, 03 Feb 2006 17:58:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/setting-printing-path-problem/m-p/1548058#M37097</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-03T17:58:08Z</dc:date>
    </item>
  </channel>
</rss>

