I'm trying to write an add-in for SOLIDWORKS and get familiar with the API. I started by adding a menu item
<code style="background-color: #eff0f1; border: 0px; font-weight: inherit;"><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">public</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">bool</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ConnectToSW</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">(</span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">object</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ThisSW</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">int</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">Cookie</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">)<br></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">{<br> </span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ThisSW</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">=</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ThisSW</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">as</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ISldWorks</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">;<br> </span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">Cookie</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">=</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">Cookie</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">;<br> </span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ThisSW</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">SetAddinCallbackInfo2</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">(</span><span class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;">0</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">Cookie</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">);<br> </span><code style="background-color: #eff0f1; border: 0px; font-weight: inherit;"><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span style="border: 0px; color: #303336; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">SwEventPtr</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">=</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">(</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">SldWorks</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">)</span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ThisSW</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">;<br></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"><br> </span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">ThisSW</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">AddMenuItem5</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">(<br> (</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">int</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">)</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">swDocumentTypes_e</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">swDocPART</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">this</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">.</span><span class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;">Cookie</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;">"Item@&File"</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;">0</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">null</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">null</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;">"My Menu Item"</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">,</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">null</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">);<br><br> </span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">return</span> <span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;">true</span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">;<br></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"></span><span class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;">}</span>
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?
SolidworksApi/macros

