Get ActiveX/COM class properties and methods from .NET

By Adam Nagy

If you are using the COM interface of e.g. AutoCAD or Inventor from a .NET AddIn or application and you want to be able to find out what properties and methods are available for the object, then here is a nice post which shows excactly that. It works even if your project is not referencing the relevant type library/interop assembly and so you are using late binding:
Obtain Type Information of IDispatch-Based COM Objects from Managed Code

I tested it with both Inventor and AutoCAD and it seemed to work fine – I got back all the items shown under Dynamic View inside the Watch window:

Com
 


Comments

One response to “Get ActiveX/COM class properties and methods from .NET”

  1. Have been using Autocad for years now and it’s still the best.

Leave a Reply to Superior EquipmentCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading