<?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: Issue with INSNAME. in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353331#M57082</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While loading .net dlls into Autocad, &amp;nbsp;we will refer one dll (Main dll).&lt;/P&gt;&lt;P&gt;&amp;nbsp;This code is working fine in that dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Main dll will refer other dlls for UI layer and Business Layer. Right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In those dll, this code is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Mar 2012 09:16:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-01T09:16:26Z</dc:date>
    <item>
      <title>Issue with INSNAME.</title>
      <link>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353197#M57078</link>
      <description>&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are unable to set the value for system variable "INSNAME" .&lt;/P&gt;&lt;P&gt;It is returning nothing after assigning values for this variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using below statement for setting the value.&lt;/P&gt;&lt;P&gt;Application.SetSystemVariable("INSNAME ",&amp;nbsp;"test");&lt;/P&gt;&lt;P&gt;&amp;nbsp;string str1 = Application.GetSystemVariable("INSNAME").ToString(​);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;str1 string value is "" (nothing). and value is not assigning to this variable.&lt;/P&gt;&lt;P&gt;(We are working in AutoCAD 2010. using programming language as .net 3.5).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give advice on this issue.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Mar 2012 04:36:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353197#M57078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-01T04:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with INSNAME.</title>
      <link>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353223#M57079</link>
      <description>&lt;P&gt;Try this test code:&lt;/P&gt;
&lt;PRE&gt;using System;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.EditorInput;
// This line is not mandatory, but improves loading performances
[assembly: CommandClass(typeof(Rivilis.SetVar))]
namespace Rivilis
{
    public class SetVar
    {
        [CommandMethod("SetInsName", CommandFlags.Modal)]
        public void SetInsName()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            Application.SetSystemVariable("INSNAME", "test");
            string insname = Application.GetSystemVariable("INSNAME") as string;
            if (insname != null) {
                ed.WriteMessage("\nINSNAME = \"{0}\"", insname);
            } else  {
                ed.WriteMessage("\nCan not get INSNAME!");
            }
        }
    }
}
&lt;/PRE&gt;
&lt;P&gt;In what context you try to execute your's code?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2012 06:32:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353223#M57079</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-03-01T06:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with INSNAME.</title>
      <link>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353287#M57080</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is working fine in Main dll. which is attaching to autocad using netload.&lt;/P&gt;&lt;P&gt;But it is not working in reference dll to main dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually I am using above command with&amp;nbsp;followed by &amp;nbsp;"Insert" Command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise on this&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2012 08:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353287#M57080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-01T08:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with INSNAME.</title>
      <link>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353329#M57081</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;... But it is not working in reference dll to main dll...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;I did not understand&lt;/SPAN&gt; w&lt;SPAN class="hps alt-edited"&gt;hat do you mean&lt;/SPAN&gt;&lt;/SPAN&gt;. Is that dll running in another thread?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2012 09:12:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353329#M57081</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-03-01T09:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with INSNAME.</title>
      <link>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353331#M57082</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While loading .net dlls into Autocad, &amp;nbsp;we will refer one dll (Main dll).&lt;/P&gt;&lt;P&gt;&amp;nbsp;This code is working fine in that dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Main dll will refer other dlls for UI layer and Business Layer. Right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In those dll, this code is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2012 09:16:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issue-with-insname/m-p/3353331#M57082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-01T09:16:26Z</dc:date>
    </item>
  </channel>
</rss>

