<?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: Debugging C# with AutoCAD 2006 in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371331#M84477</link>
    <description>How about using assemblies late binding method. You create a loader class and binding your object class into AutoCAD. I'm just thinking, haven't try. Hope it works!</description>
    <pubDate>Sun, 11 Dec 2005 10:36:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-12-11T10:36:08Z</dc:date>
    <item>
      <title>Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371324#M84470</link>
      <description>Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I'm writing code in VS2005 (C#) and would like to know if there is a better &lt;BR /&gt;
why to debug than my current method. Currently, I wrote the code and compile &lt;BR /&gt;
in VS. Then, I start AutoCAD and use NETLOAD to load the DLL and test my &lt;BR /&gt;
application. If I find a problem, I go back to VS, change the code, &lt;BR /&gt;
recompile, restart AutoCAD, etc. This is, to say the least, a rather long &lt;BR /&gt;
process when I just want to see the results of some "what if" scenarios that &lt;BR /&gt;
are just part of the process of learning a new programming language.&lt;BR /&gt;
&lt;BR /&gt;
1) Any suggestions for debugging inside VS with AutoCAD?&lt;BR /&gt;
2) Can I unload .NET assemblies in AutoCAD 2006 without restarting AutoCAD? &lt;BR /&gt;
This would save me steps / time involved with restarting AutoCAD / Civil 3D.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Scott</description>
      <pubDate>Tue, 05 Jul 2005 19:36:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371324#M84470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-05T19:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371325#M84471</link>
      <description>This is the technique I use. There's nothing better. There's no way to &lt;BR /&gt;
unload .net assemblies that are loaded.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;BR /&gt;
"Homer Simpson" &lt;HOMER&gt; wrote in message &lt;BR /&gt;
news:4893081@discussion.autodesk.com...&lt;BR /&gt;
Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I'm writing code in VS2005 (C#) and would like to know if there is a better&lt;BR /&gt;
why to debug than my current method. Currently, I wrote the code and compile&lt;BR /&gt;
in VS. Then, I start AutoCAD and use NETLOAD to load the DLL and test my&lt;BR /&gt;
application. If I find a problem, I go back to VS, change the code,&lt;BR /&gt;
recompile, restart AutoCAD, etc. This is, to say the least, a rather long&lt;BR /&gt;
process when I just want to see the results of some "what if" scenarios that&lt;BR /&gt;
are just part of the process of learning a new programming language.&lt;BR /&gt;
&lt;BR /&gt;
1) Any suggestions for debugging inside VS with AutoCAD?&lt;BR /&gt;
2) Can I unload .NET assemblies in AutoCAD 2006 without restarting AutoCAD?&lt;BR /&gt;
This would save me steps / time involved with restarting AutoCAD / Civil 3D.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Scott&lt;/HOMER&gt;</description>
      <pubDate>Tue, 05 Jul 2005 23:01:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371325#M84471</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-05T23:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371326#M84472</link>
      <description>The only step I was able to elimanate was manually typing the he "netLoad" command.&lt;BR /&gt;
I did this by including a script in my ADT short cut, where in the scipt file, I used the command "_NETLOAD"</description>
      <pubDate>Wed, 06 Jul 2005 12:49:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371326#M84472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-06T12:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371327#M84473</link>
      <description>under the project properties you could eliminate the start AutoCAD step by &lt;BR /&gt;
setting the "Start external program" to the location of autocad. this &lt;BR /&gt;
setting is under the debugging properties in that dialog.&lt;BR /&gt;
&lt;BR /&gt;
Matthew&lt;BR /&gt;
&lt;BR /&gt;
&lt;GARYPUERINI&gt; wrote in message news:4893631@discussion.autodesk.com...&lt;BR /&gt;
The only step I was able to elimanate was manually typing the he "netLoad" &lt;BR /&gt;
command.&lt;BR /&gt;
I did this by including a script in my ADT short cut, where in the scipt &lt;BR /&gt;
file, I used the command "_NETLOAD"&lt;/GARYPUERINI&gt;</description>
      <pubDate>Wed, 06 Jul 2005 13:22:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371327#M84473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-06T13:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371328#M84474</link>
      <description>In the Script file you could use an autolisp function.  I have not tested&lt;BR /&gt;
this but you could try it.  You can use autolisp in a script file.&lt;BR /&gt;
&lt;BR /&gt;
(command "netload" "c:/mypath/myfile.dll")&lt;BR /&gt;
&lt;BR /&gt;
hth&lt;BR /&gt;
Matthew&lt;BR /&gt;
&lt;BR /&gt;
"Homer Simpson" &lt;HOMER&gt; wrote in message &lt;BR /&gt;
news:4893081@discussion.autodesk.com...&lt;BR /&gt;
Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I'm writing code in VS2005 (C#) and would like to know if there is a better&lt;BR /&gt;
why to debug than my current method. Currently, I wrote the code and compile&lt;BR /&gt;
in VS. Then, I start AutoCAD and use NETLOAD to load the DLL and test my&lt;BR /&gt;
application. If I find a problem, I go back to VS, change the code,&lt;BR /&gt;
recompile, restart AutoCAD, etc. This is, to say the least, a rather long&lt;BR /&gt;
process when I just want to see the results of some "what if" scenarios that&lt;BR /&gt;
are just part of the process of learning a new programming language.&lt;BR /&gt;
&lt;BR /&gt;
1) Any suggestions for debugging inside VS with AutoCAD?&lt;BR /&gt;
2) Can I unload .NET assemblies in AutoCAD 2006 without restarting AutoCAD?&lt;BR /&gt;
This would save me steps / time involved with restarting AutoCAD / Civil 3D.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Scott&lt;/HOMER&gt;</description>
      <pubDate>Wed, 06 Jul 2005 19:17:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371328#M84474</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-06T19:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371329#M84475</link>
      <description>worked great, thanks!</description>
      <pubDate>Thu, 07 Jul 2005 14:30:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371329#M84475</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-07T14:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371330#M84476</link>
      <description>Then set 'startin' to your debug directory, and have an acaddoc.lsp in this&lt;BR /&gt;
director to netload your app and anything else you need</description>
      <pubDate>Tue, 19 Jul 2005 01:27:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371330#M84476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-19T01:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371331#M84477</link>
      <description>How about using assemblies late binding method. You create a loader class and binding your object class into AutoCAD. I'm just thinking, haven't try. Hope it works!</description>
      <pubDate>Sun, 11 Dec 2005 10:36:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371331#M84477</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-11T10:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371332#M84478</link>
      <description>Here is the method I use.&lt;BR /&gt;
&lt;BR /&gt;
1.) I create an AutoCAD Script File in my programs source directory. &lt;BR /&gt;
(i.e. "C:\Projects\TestProj\Load.scr")&lt;BR /&gt;
&lt;BR /&gt;
2.) I open this file in notepad and add the text to load the dll.&lt;BR /&gt;
(i.e. _netload C:\Projects\TestProj\bin\TestProj.dll)&lt;BR /&gt;
&lt;BR /&gt;
3.) In the "Configuration Properties" section of the projects Property Pages, I change the "Start Action" to "Start External Program" and add path to AutoCAD exe, then add the "Command Line arguments" to load the script file.&lt;BR /&gt;
(i.e. /nologo /b "C:\Projects\TestProj\Load.scr")&lt;BR /&gt;
&lt;BR /&gt;
This seems to work well for me. You could also add the name of a drawing to open so you don't have to open one up each time you debug.&lt;BR /&gt;
(i.e. "C:\Drawings\Test.dwg" /nologo /b "C:\Projects\TestProj\Load.scr")&lt;BR /&gt;
&lt;BR /&gt;
Note that I add the /nologo switch, which seems to load AutoCAD faster.&lt;BR /&gt;
&lt;BR /&gt;
There are several other command line switches for AutoCAD. Find them in the AutoCAD Help Files, search for "Customize Startup - Concepts".&lt;BR /&gt;
&lt;BR /&gt;
Good Luck,&lt;BR /&gt;
C

Message was edited by: CougerAC</description>
      <pubDate>Mon, 12 Dec 2005 15:05:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371332#M84478</guid>
      <dc:creator>cgay</dc:creator>
      <dc:date>2005-12-12T15:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371333#M84479</link>
      <description>Yes, it worked, I manage to add your code, and it is now working fine.&lt;BR /&gt;
&lt;BR /&gt;
I look that I was missing the CommandFlags.Session part. I was wondering what does it do.&lt;BR /&gt;
&lt;BR /&gt;
Thanks you very much Couger and Tony.</description>
      <pubDate>Tue, 07 Feb 2006 16:37:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371333#M84479</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-07T16:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging C# with AutoCAD 2006</title>
      <link>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371334#M84480</link>
      <description>Yes, it worked, I manage to add your code, and it is now working fine.&lt;BR /&gt;
&lt;BR /&gt;
I look that I was missing the CommandFlags.Session part. I was wondering what does it do.&lt;BR /&gt;
&lt;BR /&gt;
Thanks you very much Couger and Tony.</description>
      <pubDate>Tue, 07 Feb 2006 16:37:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/debugging-c-with-autocad-2006/m-p/1371334#M84480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-07T16:37:45Z</dc:date>
    </item>
  </channel>
</rss>

