.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Autocad feedback to external .net program

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
systemRobert
512 Views, 2 Replies

Autocad feedback to external .net program

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.

2 REPLIES 2
Message 2 of 3
norman.yuan
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.

 

 

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3
systemRobert
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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost