Any common code snippets I use for Autodesk Inventor I will post here.
Connect to open instance of Autodesk Inventor:
Inventor.Application instance = (Inventor.Application)Marshal.GetActiveObject("Inventor.Application");