<?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 Command not starting in debug in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3660164#M52932</link>
    <description>&lt;P&gt;I am writing a program in vb.net.&lt;/P&gt;&lt;P&gt;I have a command.&lt;/P&gt;&lt;P&gt;&amp;lt;CommandMethod("att2att")&amp;gt; _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub att2att()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ed As Editor&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ed.WriteMessage(String.Format("{0} commande: att2att, maintenant disponible...", System.Environment.NewLine))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim start As New FileSelect&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start.ShowDialog()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the debug mode, the att2att is not recognize.&lt;/P&gt;&lt;P&gt;If I compile, netload and call the command, it works. Why is the command not recognize in debug mode?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Oct 2012 18:03:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-10-15T18:03:45Z</dc:date>
    <item>
      <title>Command not starting in debug</title>
      <link>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3660164#M52932</link>
      <description>&lt;P&gt;I am writing a program in vb.net.&lt;/P&gt;&lt;P&gt;I have a command.&lt;/P&gt;&lt;P&gt;&amp;lt;CommandMethod("att2att")&amp;gt; _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub att2att()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ed As Editor&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ed.WriteMessage(String.Format("{0} commande: att2att, maintenant disponible...", System.Environment.NewLine))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim start As New FileSelect&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start.ShowDialog()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the debug mode, the att2att is not recognize.&lt;/P&gt;&lt;P&gt;If I compile, netload and call the command, it works. Why is the command not recognize in debug mode?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 18:03:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3660164#M52932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-15T18:03:45Z</dc:date>
    </item>
    <item>
      <title>Re : Command not starting in debug</title>
      <link>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3660876#M52933</link>
      <description>&lt;P&gt;&lt;EM&gt;Salut,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Si ça fonctionne avec NETLOAD c'est probablement que le problème ne vient pas du code mais de ce qui est automatiquement exécuté au lancement du débogage.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Si rien n'a été explicitement fait pour que la dll soit chargée au démarrage d'AutoCAD (un script par exemple), elle ne sera pas automatiquement chargée (c'est le cas avec les AutoCAD .NET Wizards).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Tu trouveras sur Augifr un tuto pour créer des modèles AutoCAD pour Visual Studio avec une méthode de chargement automatique de la dll via un script :&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://augifr.ning.com/group/augi-france-developer-network-afdn/page/bibliotheque-afdn#.UH0UElHYf3Q"&gt;http://augifr.ning.com/group/augi-france-developer-network-afdn/page/bibliotheque-afdn#.UH0UElHYf3Q&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 08:00:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3660876#M52933</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2012-10-16T08:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Command not starting in debug</title>
      <link>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3661046#M52934</link>
      <description>&lt;P&gt;Try compile your project as follows:&lt;/P&gt;&lt;PRE&gt; #region "Imports"
'' your imports here

#End Region

 &amp;lt;Assembly: Autodesk.AutoCAD.Runtime.CommandClass(GetType(MyProjectName.MyClass))&amp;gt; 

Namespace MyProjectName

    Public Class MyClass

        &amp;lt;CommandMethod("att2att")&amp;gt; _
        Public Sub att2att()
' wrap your code in try-catch block
Try
            Dim ed As Editor
            ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
            ed.WriteMessage(String.Format("{0} commande: att2att, maintenant disponible...", System.Environment.NewLine))
            Dim start As New FileSelect
            start.ShowDialog()
Catch ex as System.Exception
Msgbox(ex.message &amp;amp; vblf &amp;amp; ex.stacktrace)
Finally
' do nothing or add informative message
end Try

End Sub

end class

End Namespace&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 10:51:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3661046#M52934</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-10-16T10:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Command not starting in debug</title>
      <link>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3661210#M52935</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Well, the problem is that in the debug, I do the netload but the att2att commande doesn't show. If I compile then run autocad and then netload the same dll, the att2att command is available...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really wish I could use the debugger... it will save me so much time. Thanks all for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is kind of strange! I change my code as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#Region " Imports "&lt;BR /&gt;&lt;BR /&gt;Imports System.IO&lt;BR /&gt;Imports Autodesk.AutoCAD.Interop&lt;BR /&gt;&lt;BR /&gt;Imports System.Runtime.InteropServices&lt;BR /&gt;Imports System.Windows.Forms&lt;BR /&gt;Imports Autodesk.AutoCAD.Runtime&lt;BR /&gt;Imports Autodesk.AutoCAD.ApplicationServices&lt;BR /&gt;Imports Autodesk.AutoCAD.DatabaseServices&lt;BR /&gt;'Imports Autodesk.AutoCAD.PlottingServices&lt;BR /&gt;Imports Autodesk.AutoCAD.EditorInput&lt;BR /&gt;Imports Autodesk.AutoCAD.Geometry&lt;BR /&gt;#End Region&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;Assembly: Autodesk.AutoCAD.Runtime.CommandClass(GetType(UpdCart.commandes))&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Namespace UpdCart&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Class Commandes&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CommandMethod("att2att")&amp;gt; _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub att2att()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ed As Editor&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ed.WriteMessage(String.Format("{0} commande: att2att, maintenant disponible...", System.Environment.NewLine))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim start As New FileSelect&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start.ShowDialog()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As System.Exception&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(ex.ToString, "System Exception")&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Class&lt;BR /&gt;&lt;BR /&gt;End Namespace&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 12:36:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3661210#M52935</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-16T12:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Command not starting in debug</title>
      <link>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3670894#M52936</link>
      <description>&lt;P&gt;Hello Patrick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you referring to debugging by attaching to an running instance of AutoCAD to debug the .Net Plug-in ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, “Attach to Process” for debugging a .Net plugin is not recommended and the suggested way to debug a .Net plugin is to set AutoCAD as the external program and use F5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason for it is due to the use of fibers in AutoCAD which is being removed in the newer releases of AutoCAD.&lt;/P&gt;
&lt;P&gt;Hopefully this will not be a limitation in a future release of AutoCAD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may try "Attach to Process" after setting the "NEXTFIBERWORLD" to 0 to disable the fibers in AutoCAD but it has some drawbacks such as the ribbon not responding. I havent tried this though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 17:29:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/command-not-starting-in-debug/m-p/3670894#M52936</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2012-10-23T17:29:35Z</dc:date>
    </item>
  </channel>
</rss>

