Spy for Solid Edge is open sourced on GitHub. Everything you want to know can be found in the source code. You have to have a pretty good understanding of COM in order to pull it off. To give you a hint on where to start, see my ComTypeInfo class. It has a Properties property that exposes all properties for a given COM object. Really too many details to try and explain in a forum post. I suggest you download the source, compile it and try to learn from it.