Active Member
Posts: 10
Registered: ‎08-17-2011
Message 1 of 3 (140 Views)
Accepted Solution

Autocad feedback to external .net program

140 Views, 2 Replies
03-25-2014 01:34 AM

I've written a C# program which NETLOAD:s a dll in Autocad. It works quite ok with the dll taking inputs with .SendCommand, but i can't figure out a not-really-ugly way of getting feedback from the CommandMethod to my external .net program.


Any suggestions would be appreciated.

*Expert Elite*
Posts: 987
Registered: ‎04-27-2009
Message 2 of 3 (118 Views)

Re: Autocad feedback to external .net program

03-25-2014 06:39 AM in reply to: systemRobert

So, you want AutoCAD to communicate with an external .NET app.


Regardless whatever you do in the AutoCAD side (call COM SemdCommand() or do it in other ways), you can make a WCF service call at certain point in AutoCAD side, likely when your command is ended (so, you would handle CommandEnded event), or just directly at the end of code that does some AutoCAd work. The external app hosts the WCF server and receives the AutoCAD's service call with AutoCAD processing feedback passed in.


If you are interested in later/newer technoilogy, I wrote an article in my blog on using ASP.NET SignalR technology to get AutoCAD feedback. It was only meant for a concept-proving, but may give you some idea. Using more mature WCF would be safer bet if you are to develop a mission-crtical application.




Active Member
Posts: 10
Registered: ‎08-17-2011
Message 3 of 3 (108 Views)

Re: Autocad feedback to external .net program

03-25-2014 07:32 AM in reply to: norman.yuan

I see, I see. I thought maybe I could get the command line info from the outside. I will reconsider my program structure.

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.