segmentation error when I use close_system in my sl_customization file
Afficher commentaires plus anciens
I started creating my custom menus in Simulink using a custom sl_customization.m file. In one of the menus I need to close the model with close_system(bdroot) then open it later with open_system... this process in MATLAB 2012a results in a crash segmentation error while in MATLAB 2010a it was OK.. Please help me out of this. Here's the file:
function sl_customization(cm) cm.addCustomMenuFcn('Simulink:MenuBar', @getDTmenuItems); end
function schemaFcns = getDTmenuItems(callbackInfo) schemaFcns = {@getDTmenu_container}; end
function schema = getDTmenu_container(callbackInfo) schema = sl_container_schema; schema.tag = 'Simulink:MyMenu'; schema.label = 'MyMenu'; schema.childrenFcns={@getItem0}; end
function schema = getItem0(callbackInfo) schema = sl_container_schema; schema.tag = 'Simulink:Parameters'; schema.label = 'Parameters'; schema.statustip = 'Set up how the parameters in the model appear in the generated code'; schema.childrenFcns={@getitem3_pbrief}; end
function schema = getitem3_pbrief(callbackInfo) schema = sl_action_schema; schema.tag = 'Simulink:Parametersbrief'; schema.label = 'To run pbrief'; %schema.userdata = ''; % schema.state='Disabled'; schema.statustip = 'pbrief'; schema.callback = @Item3_pbrief; end
function Item3_pbrief(callbackInfo) originalmodel = gcs save_system; close_system(originalmodel); open_system(originalmodel); end
Réponses (0)
Catégories
En savoir plus sur Simulink Environment Customization dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!