<?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 PrinterConfigPath with two paths in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3452228#M55641</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to set two locations in&amp;nbsp;PrinterConfigPath, but it crashes with fatal error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim pref As AcadPreferences = Autodesk.AutoCAD.ApplicationServices.Application.Preferences
pref.Files.PrinterConfigPath = "T:\wPlotters;T:\Plotters"&lt;/PRE&gt;&lt;P&gt;note 1: one location works fine, but i can't figure out, how to put 2 locations there&lt;/P&gt;&lt;P&gt;note 2: when i set those paths manually, the property contains exactly that string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2012 15:18:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-05-10T15:18:22Z</dc:date>
    <item>
      <title>PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3452228#M55641</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to set two locations in&amp;nbsp;PrinterConfigPath, but it crashes with fatal error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim pref As AcadPreferences = Autodesk.AutoCAD.ApplicationServices.Application.Preferences
pref.Files.PrinterConfigPath = "T:\wPlotters;T:\Plotters"&lt;/PRE&gt;&lt;P&gt;note 1: one location works fine, but i can't figure out, how to put 2 locations there&lt;/P&gt;&lt;P&gt;note 2: when i set those paths manually, the property contains exactly that string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2012 15:18:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3452228#M55641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-10T15:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3458502#M55642</link>
      <description>&lt;DIV&gt;Hmmm..&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;What version of Autocad and what version of Visual Studio?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 May 2012 19:00:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3458502#M55642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T19:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3459044#M55643</link>
      <description>&lt;P&gt;AutoCAD 2012, VS Express 2008&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2012 05:20:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3459044#M55643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-16T05:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3459120#M55645</link>
      <description>&lt;P&gt;I did not try your's code but the same can be done with help of setting environment &lt;STRONG&gt;"PrinterConfigDir"&lt;/STRONG&gt; (ObjectARX functions acedGetEnv/acedSetEnv and lisp functions (getenv) and (setenv).&lt;/P&gt;
&lt;P&gt;How to call acedGetEnv/acedSetEnv from .NET:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=33594.0" target="_blank"&gt;http://www.theswamp.org/index.php?topic=33594.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=20237.msg362493#msg362493" target="_blank"&gt;http://www.theswamp.org/index.php?topic=20237.msg362493#msg362493&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.caduser.ru/forum/index.php?PAGE_NAME=message&amp;amp;FID=49&amp;amp;TID=36668&amp;amp;MID=208004#message208004" target="_blank"&gt;http://www.caduser.ru/forum/index.php?PAGE_NAME=message&amp;amp;FID=49&amp;amp;TID=36668&amp;amp;MID=208004#message208004&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2012 07:44:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3459120#M55645</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-05-16T07:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460682#M55646</link>
      <description>&lt;P&gt;Okay so Here's some sample code I don't have any problem using the Autocad Preferences Object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp; &amp;nbsp; Public Application As Autodesk.AutoCAD.ApplicationServices.Application 'VB.NET Application Object&lt;/PRE&gt;&lt;PRE&gt; Try
            'Acad Preferences Objects
            Dim acPrefComObj As AcadPreferences = Application.Preferences

            'Set Support Paths &amp;amp; Preferences
            With acPrefComObj.Files
                'Editor.WriteMessage("Entered Loop")

                'Change Value in Autocad Preferences if Variable is NOT empty---------------
                .CustomIconPath = sCustomIconPath
                .DriversPath = sDriversPath
               .PrinterDescPath = sPrinterConfigPath
               .PrinterConfigPath = sPrinterConfigPath
               .PrinterStyleSheetPath = sPrinterStyleSheetPath
                .SupportPath = sSupportPath
                .TempFilePath = sTempFilePath
                .TemplateDwgPath = sTemplateDwgPath
                 .ToolPalettePath = sToolPalettePath
                .AutoSavePath = sAutoSavePath

                '---------------------------------------------------------------------------
                '---------------------------------------------------------------------------

            End With


            Editor.WriteMessage(vbTab &amp;amp; "&amp;lt;&amp;lt;[Support Paths Set&amp;gt;&amp;gt;" &amp;amp; Environment.NewLine)

            '---------------------------------------------------------------------------
            'AUTOSAVE SET
            With acPrefComObj.OpenSave
                .AutoSaveInterval = 11
            End With

            Editor.WriteMessage(vbTab &amp;amp; "&amp;lt;&amp;lt;AutoSave Interval Set&amp;gt;&amp;gt;" &amp;amp; Environment.NewLine)

            '---------------------------------------------------------------------------

            '---------------------------------------------------------------------------
            'DefaultPlot File Path &amp;amp; Printer
            With acPrefComObj.Output
                .DefaultPlotToFilePath = _
                Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

                .DefaultOutputDevice = DefaultPrinterName()
            End With

            Editor.WriteMessage(vbTab &amp;amp; "&amp;lt;&amp;lt;Default Printer Set&amp;gt;&amp;gt;" &amp;amp; Environment.NewLine)
            '---------------------------------------------------------------------------


            Editor.WriteMessage(vbTab &amp;amp; "&amp;lt;&amp;lt;Support Settings Done&amp;gt;&amp;gt;" &amp;amp; Environment.NewLine)

            Editor.WriteMessage(vbTab &amp;amp; "&amp;lt;&amp;lt;-----------------------------------------------&amp;gt;&amp;gt;" &amp;amp; Environment.NewLine)

        Catch ex As Exception

            Editor.WriteMessage("[ERROR:" &amp;amp; ex.Message &amp;amp; vbTab &amp;amp; ex.ErrorStatus.ToString)

        End Try&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2012 22:40:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460682#M55646</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-16T22:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460694#M55647</link>
      <description>&lt;P&gt;I tested your code on my machine. Invalid Argurment error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doesn't like two different paths. Huh?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Who would have thought.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2012 22:49:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460694#M55647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-16T22:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460850#M55648</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;I tested your code on my machine. Invalid Argurment error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doesn't like two different paths. Huh?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Who would have thought.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;The previous&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;version of AutoCAD&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;was not allowed to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;have more than one&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;path in&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;PrinterConfigPath.&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;That is why there is a problem with Autocad Preferences Object (IMHO).&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;If so&lt;/SPAN&gt;&lt;SPAN&gt;, then&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the only solution&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;- to use&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;acedSetEnv&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;as I wrote&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;above.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2012 04:22:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460850#M55648</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-05-17T04:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460876#M55649</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/481027"&gt;@Alexander.Rivilis&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;The previous&lt;/SPAN&gt; &lt;SPAN&gt;version of AutoCAD&lt;/SPAN&gt; &lt;SPAN&gt;was not allowed to&lt;/SPAN&gt; &lt;SPAN&gt;have more than one&lt;/SPAN&gt; &lt;SPAN&gt;path in&lt;/SPAN&gt; &lt;SPAN&gt;PrinterConfigPath.&lt;/SPAN&gt; &lt;SPAN&gt;That is why there is a problem with Autocad Preferences Object (IMHO).&lt;/SPAN&gt; &lt;SPAN&gt;If so&lt;/SPAN&gt;&lt;SPAN&gt;, then&lt;/SPAN&gt; &lt;SPAN&gt;the only solution&lt;/SPAN&gt; &lt;SPAN&gt;- to use&lt;/SPAN&gt; &lt;SPAN&gt;acedSetEnv&lt;/SPAN&gt; &lt;SPAN&gt;as I wrote&lt;/SPAN&gt; &lt;SPAN&gt;above.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;OK, I will give it a try. I was waiting for another possible solution, because I don't fully understand that invoke voodoo, so I try to avoid it, if I can.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2012 05:28:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3460876#M55649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-17T05:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3461040#M55650</link>
      <description>&lt;P&gt;Minimum testing with AutoCAD 2013.&lt;/P&gt;
&lt;P&gt;C#:&lt;/P&gt;
&lt;PRE&gt;using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.EditorInput;
using AcRx = Autodesk.AutoCAD.Runtime;
using AcEd = Autodesk.AutoCAD.EditorInput;
using AcDb = Autodesk.AutoCAD.DatabaseServices;
using AcAp = Autodesk.AutoCAD.ApplicationServices;
using AcWin = Autodesk.AutoCAD.Windows;

[assembly: CommandClass(typeof(SetEnvInNet.MyCommands))]

namespace SetEnvInNet
{

    public static class Env
    {
        static int Ver = AcAp.Application.Version.Major;
        // AutoCAD 2007...2012
        [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "acedGetEnv")]
        extern static private Int32 acedGetEnv12(string var, StringBuilder val);
        // AutoCAD 2013...
        [DllImport("accore.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "acedGetEnv")]
        extern static private Int32 acedGetEnv13(string var, StringBuilder val);
        static public string GetEnv(string var)
        {
            StringBuilder val = new StringBuilder(16536);
            if (Ver &amp;lt;= 12) acedGetEnv12(var, val); else acedGetEnv13(var, val);
            return val.ToString();
        }
        // AutoCAD 2007...2012
        [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "acedSetEnv")]
        extern static private Int32 acedSetEnv12(string var, string val);
        // AutoCAD 2013...
        [DllImport("accore.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "acedSetEnv")]
        extern static private Int32 acedSetEnv13(string var, string val);
        static public void SetEnv(string var, string val)
        {
            if (Ver &amp;lt;= 12) acedSetEnv12(var, val); else acedSetEnv13(var, val);
        }

    }
    public class MyCommands
    {
        static public void AddPath(string var, string path)
        {
            StringBuilder oldpath = new StringBuilder(Env.GetEnv(var));
            oldpath.Append(";"); oldpath.Append(path);
            Env.SetEnv(var, oldpath.ToString());
        }

        [CommandMethod("SetPath", CommandFlags.Modal)]
        public void TestAddPath()
        {
            AcWin.OpenFileDialog dlg = new AcWin.OpenFileDialog("Select Directory:", "", "", "", 
                AcWin.OpenFileDialog.OpenFileDialogFlags.AllowFoldersOnly);
            DialogResult ds = dlg.ShowDialog();
            if (ds == DialogResult.OK)
            {
                AddPath("PrinterConfigDir",dlg.Filename);
            }
        }
    }
}


&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;VB.NET (converted from C# with &lt;A href="http://www.developerfusion.com/tools/convert/csharp-to-vb/)" target="_blank"&gt;http://www.developerfusion.com/tools/convert/csharp-to-vb/)&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Windows.Forms
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput
Imports AcRx = Autodesk.AutoCAD.Runtime
Imports AcEd = Autodesk.AutoCAD.EditorInput
Imports AcDb = Autodesk.AutoCAD.DatabaseServices
Imports AcAp = Autodesk.AutoCAD.ApplicationServices
Imports AcWin = Autodesk.AutoCAD.Windows

&amp;lt;Assembly: CommandClass(GetType(SetEnvInNet.MyCommands))&amp;gt;

Namespace SetEnvInNet

	Public NotInheritable Class Env
		Private Sub New()
		End Sub
		Shared Ver As Integer = AcAp.Application.Version.Major
		' AutoCAD 2007...2012
		&amp;lt;DllImport("acad.exe", CallingConvention := CallingConvention.Cdecl, CharSet := CharSet.Unicode, EntryPoint := "acedGetEnv")&amp;gt; _
		Private Shared Function acedGetEnv12(var As String, val As StringBuilder) As Int32
		End Function
		' AutoCAD 2013...
		&amp;lt;DllImport("accore.dll", CallingConvention := CallingConvention.Cdecl, CharSet := CharSet.Unicode, EntryPoint := "acedGetEnv")&amp;gt; _
		Private Shared Function acedGetEnv13(var As String, val As StringBuilder) As Int32
		End Function
		Public Shared Function GetEnv(var As String) As String
			Dim val As New StringBuilder(16536)
			If Ver &amp;lt;= 12 Then
				acedGetEnv12(var, val)
			Else
				acedGetEnv13(var, val)
			End If
			Return val.ToString()
		End Function
		' AutoCAD 2007...2012
		&amp;lt;DllImport("acad.exe", CallingConvention := CallingConvention.Cdecl, CharSet := CharSet.Unicode, EntryPoint := "acedSetEnv")&amp;gt; _
		Private Shared Function acedSetEnv12(var As String, val As String) As Int32
		End Function
		' AutoCAD 2013...
		&amp;lt;DllImport("accore.dll", CallingConvention := CallingConvention.Cdecl, CharSet := CharSet.Unicode, EntryPoint := "acedSetEnv")&amp;gt; _
		Private Shared Function acedSetEnv13(var As String, val As String) As Int32
		End Function
		Public Shared Sub SetEnv(var As String, val As String)
			If Ver &amp;lt;= 12 Then
				acedSetEnv12(var, val)
			Else
				acedSetEnv13(var, val)
			End If
		End Sub

	End Class
	Public Class MyCommands
		Public Shared Sub AddPath(var As String, path As String)
			Dim oldpath As New StringBuilder(Env.GetEnv(var))
			oldpath.Append(";")
			oldpath.Append(path)
			Env.SetEnv(var, oldpath.ToString())
		End Sub

		&amp;lt;CommandMethod("SetPath", CommandFlags.Modal)&amp;gt; _
		Public Sub TestAddPath()
			Dim dlg As New AcWin.OpenFileDialog("Select Directory:", "", "", "", AcWin.OpenFileDialog.OpenFileDialogFlags.AllowFoldersOnly)
			Dim ds As DialogResult = dlg.ShowDialog()
			If ds = DialogResult.OK Then
				AddPath("PrinterConfigDir", dlg.Filename)
			End If
		End Sub
	End Class
End Namespace


&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2012 09:46:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/3461040#M55650</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-05-17T09:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/4930814#M55651</link>
      <description>&lt;P&gt;I know this topic is a couple of years old, but I am trying to replicate this in 2015 with no sucess.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone written an update that works in 2015?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Strange thing... if I strip out all of the Initialization functionality, and turn it into a class library, I can get it to work through an Visual Studio debug session.&amp;nbsp; But if I build the solution and startup AutoCAD detached from Visual Studio, it will not run properly after NETLOADing the function.&amp;nbsp; It runs, but after I open the Options dialog, it hangs for about 2 minutes before it finally opens.&amp;nbsp; Then, the paths are only displying the latest value entered instead of both values I have added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone know of a reason why it would work through a debug session, but not through a detached session of AutoCAD?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2014 23:13:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/4930814#M55651</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2014-04-02T23:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/4931434#M55652</link>
      <description>&lt;P&gt;Function acedGetEnv in ObjectARX 2015 has new signature:&lt;/P&gt;
&lt;PRE&gt;int            acedGetEnv (const ACHAR *sym, ACHAR  *var, size_t nBufLen);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;instead of ObjectARX 2014 and early:&lt;/P&gt;
&lt;PRE&gt;int            acedGetEnv (const ACHAR *sym, ACHAR  *var);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;So code have to look like this (not tested):&lt;/P&gt;
&lt;PRE&gt;[DllImport("accore.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "acedGetEnv")]
extern static private Int32 acedGetEnv&lt;STRONG&gt;15&lt;/STRONG&gt;(string var, StringBuilder val, UIntPtr valLen);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2014 08:17:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/4931434#M55652</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2014-04-03T08:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: PrinterConfigPath with two paths</title>
      <link>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/4932554#M55653</link>
      <description>&lt;P&gt;Thank you Alexander!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saw that the function changed when I was looking through the 2015 arxdoc.chm for info on it, but I kind of glazed over it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works perfectly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep up the great work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2014 14:49:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/printerconfigpath-with-two-paths/m-p/4932554#M55653</guid>
      <dc:creator>Rob.O</dc:creator>
      <dc:date>2014-04-03T14:49:59Z</dc:date>
    </item>
  </channel>
</rss>

