Autocad feedback to external .net program

Autocad feedback to external .net program

Anonymous
Not applicable
929 Views
2 Replies
Message 1 of 3

Autocad feedback to external .net program

Anonymous
Not applicable

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.

0 Likes
Accepted solutions (1)
930 Views
2 Replies
Replies (2)
Message 2 of 3

Norman_Yuan
Mentor
Mentor
Accepted solution

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

0 Likes
Message 3 of 3

Anonymous
Not applicable

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

0 Likes