I'm trying to write an add-in for SOLIDWORKS and get familiar with the API. I started by adding a menu item
public bool ConnectToSW(object ThisSW, int Cookie)
this.ThisSW = ThisSW as ISldWorks;
this.Cookie = Cookie;
this.ThisSW.SetAddinCallbackInfo2(0, this, this.Cookie);
SwEventPtr = (SldWorks)this.ThisSW;
(int)swDocumentTypes_e.swDocPART, this.Cookie, "Item@&File", 0, null, null, "My Menu Item", null);
I've successfully registered the program containing the above snippet.
However, when I open the File menu, there is no Item item. What am I doing wrong?