I added a new option in model context menu with sl_customization function which calls a function.
function sl_customization(cm)
cm.addCustomMenuFcn('Simulink:PreContextMenu', @getMyMenuItems);
end
function schemaFcns = getMyMenuItems(callbackInfo)
schemaFcns = {@getLC};
end
function schema = getLC(callbackInfo)
schema = sl_action_schema;
schema.label = 'MyOption';
schema.userdata = 'myUserData';
schema.callback = @myOption;
end
function myOption(callbackInfo)
end
As I commented in the last function I want to find from where was called. I tried to find something in callbackInfo but I couldn't find what I wanted. Should I do it differently? If you need any details please let me know.
Thank you!