segmentation error when I use close_system in my sl_customization file

2 Ansichten (letzte 30 Tage)
Babak
Babak am 23 Jul. 2012
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

Antworten (0)

Kategorien

Mehr zu Simulink Environment Customization finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by