public AddPart() { Location = new System.Drawing.Point(450, 350); InitializeComponent(); TopMost = true; //Used to access StandardAddInServer's exposed API try { mApplication = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application") as Inventor.Application; } catch { Type inventorAppType = System.Type.GetTypeFromProgID("Inventor.Application"); mApplication = System.Activator.CreateInstance(inventorAppType) as Inventor.Application; } mApplication.Visible = true; //Iterates through Inventor Add-Ins collection foreach (ApplicationAddIn oAddIn in mApplication.ApplicationAddIns) { //Looks for our DemoAddin CLSID; if (oAddIn.ClassIdString == "{E50BE244-9F7B-4B94-8F87-8224FABA8CA1}") { //Calls Automation property mAddInInterface = (IAutomationInterface)oAddIn.Automation; } } }