<?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 Creating a AcCoreConsole.exe .NET addin in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4332603#M48652</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to create a .NET addin running in AcCoreConsole.exe. In this project I've removed the reference to AcMgd.dll and replaced it with AcCoreMgd.dll.&amp;nbsp;&lt;SPAN&gt;Is it correct that i cannot use the AcMgd.dll if I am to run my .NET addin from within AcCoreConsole.exe?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If so, how do access the DocumentManager?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For instance:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DocumentCollection ^acDocMgr = Autodesk::AutoCAD::ApplicationServices::Application::DocumentManager;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gives the error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;error C2039: 'DocumentManager' : is not a member of 'Autodesk::AutoCAD::ApplicationServices'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a replacement in the AcCoreMgd.dll for the DocumentManager?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bjørn Egil Jenssen&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2013 11:04:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-17T11:04:36Z</dc:date>
    <item>
      <title>Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4332603#M48652</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to create a .NET addin running in AcCoreConsole.exe. In this project I've removed the reference to AcMgd.dll and replaced it with AcCoreMgd.dll.&amp;nbsp;&lt;SPAN&gt;Is it correct that i cannot use the AcMgd.dll if I am to run my .NET addin from within AcCoreConsole.exe?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If so, how do access the DocumentManager?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For instance:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DocumentCollection ^acDocMgr = Autodesk::AutoCAD::ApplicationServices::Application::DocumentManager;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gives the error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;error C2039: 'DocumentManager' : is not a member of 'Autodesk::AutoCAD::ApplicationServices'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a replacement in the AcCoreMgd.dll for the DocumentManager?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bjørn Egil Jenssen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 11:04:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4332603#M48652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-17T11:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4333608#M48653</link>
      <description>&lt;P&gt;Try import this namespace&lt;/P&gt;
&lt;P&gt;Autodesk.AutoCAD.ApplicationServices.&lt;STRONG&gt;Core&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 19:18:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4333608#M48653</guid>
      <dc:creator>augusto.goncalves</dc:creator>
      <dc:date>2013-07-17T19:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4333610#M48654</link>
      <description>&lt;P&gt;And yes, you cannot include reference to &lt;SPAN&gt;AcMgd.dll&lt;/SPAN&gt; if you plan to run the addin on AutoCAD Console.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 19:18:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4333610#M48654</guid>
      <dc:creator>augusto.goncalves</dc:creator>
      <dc:date>2013-07-17T19:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4334071#M48655</link>
      <description>&lt;P&gt;Thanks, that did the trick &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what about extension methods?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DocumentExtension::CloseAndSave(acDoc, dwgfile);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Document ^acDoc = &lt;STRONG&gt;DocumentCollectionExtension::Add(acDocMgr, strTemplatePath);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I go about replacing the functionality of these two methods using only AcCoreMgd?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Bjørn&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2013 07:25:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4334071#M48655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-18T07:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4334752#M48656</link>
      <description>&lt;P&gt;Some commands will not apply to the console...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally, you should open one console for each document passing the file you want to process. The main reason for that is to avoid memory fragmentation and process on hold.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2013 13:17:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4334752#M48656</guid>
      <dc:creator>augusto.goncalves</dc:creator>
      <dc:date>2013-07-18T13:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4335791#M48657</link>
      <description>&lt;P&gt;I see. In my application I need to create new files (not open existing ones), and fill them with geometry. I've now been able to compile and run my application with all its functionality, except creating new files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any workaround to create a new DWG file from a template file using the AcCoreConsole.exe? Either through .NET code, or by using console commands?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bjørn&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2013 10:52:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4335791#M48657</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-19T10:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4335962#M48658</link>
      <description>&lt;P&gt;I would say that you can start the console, draw what you need with a .NET custom command, then call AutoCAD built-in SAVE command passing the file path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you think that can work?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2013 13:23:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4335962#M48658</guid>
      <dc:creator>augusto.goncalves</dc:creator>
      <dc:date>2013-07-19T13:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4337969#M48659</link>
      <description>&lt;P&gt;This works, however, my application needs to create several DWG's in one "go". So after calling the SAVE command, I need to create a new file, or close the recently saved file, on order to continue on to the next.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be possible to close the entire console and restart it to continue where I left of, but it would be more elegant if I could create mutiple files in one go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried the NEW command in the console, but it doesnt seem to do anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any ways to either close the "active" file, or create a new file from the AcCoreConsole.exe?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reg.&lt;/P&gt;&lt;P&gt;Bjørn&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 07:04:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4337969#M48659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-22T07:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a AcCoreConsole.exe .NET addin</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4338894#M48660</link>
      <description>&lt;P&gt;Note that opening many drawings on the same session will cause memory fragmentation, and use one session for each drawing is one of the great advantages of the console.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, one you launch the console passing one file and one script, you can only get the result, and you're not able to interact with it on the fly....&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 16:23:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-a-accoreconsole-exe-net-addin/m-p/4338894#M48660</guid>
      <dc:creator>augusto.goncalves</dc:creator>
      <dc:date>2013-07-22T16:23:03Z</dc:date>
    </item>
  </channel>
</rss>

