API: example of how to add macro to rmb

Can anyone provide an example of how to add a macro to the rmb in solidworks.
Thanks

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
You can't. There are very few limitations of macros compared to add- ins, but this is one : you can't use the callback functions system from macros, so you can't handle menus from macros.
Callback functions are those called when you call a toolbar button, or a menu (regular or rmb). Those callback functions have to be in a DLL. Check Frame::AddMenuPopupItem in API help to see how it works.
A nice way to circumvent this limitation is to build an addin which can be parametrized to build toolbars and macros and then call specific macros. Axemble (french VAR) has made something like this for their set of tools you can get from here http://www.mycadservices.fr/mycad/portal/anon/Utilitaires (don't remember if it handles RMB).
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Sorry, I should clarify... My "macro" is an add-in.
I think Frame::AddMenuPopupItem is what I am looking for, I tried the web site you referenced but I do not speak french so I could not understand it.
Would you happen to have an example in english?
Thanks,
Sam
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
In SW2008 you can easily add extra commands (and macros) to the menu that pops-up after hitting the "S" on the keyboard.
(Don't know if this is where you looking for) \/\/illem

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.