public bool ConnectToSW(object ThisSW, int cookie) { iSwApp = (ISldWorks)ThisSW; addinID = cookie; //Setup callbacks iSwApp.SetAddinCallbackInfo(0, this, addinID); iSwApp.AddMenuItem4((int)swDocumentTypes_e.swDocPART, addinID, "Export STLs", -1, "ExportPartSTLs", "", "", ""); return true; }