User Input to the Dropdown menu in appdesigner

3 次查看(过去 30 天)
Hi,
I am developing an application where I need to run some .m files. So, I created a dropdown menu (with 4 options say for eg: a,b,c,d) which when selected and run opens a directory window to select the corresponding .m file to select and run.
If in case in fututre, if the user wants one more option (eg: e) to be added to the dropdown menu list, I have a provision to write the name for dropdown as e and add that to the dropdown menu and run the model.
But, when I close the app and run the app again, the newly added dropdown menu (e) is not there. I need to store that into the database permanetaly. Any suggestions for this ?
%% Code to add the new dropdown name to the dropdown list
app.new = app.EditField2.Value;
if ~any(ismember(app.DropDown.Items,app.new))
app.DropDown.Items = [app.DropDown.Items app.new];
end
%% Code to run the corresponding model
if app.DropDown.Value == app.new
RunModel5; %% name of .m file
end
I want the Item added to be stored permanentaly and also the RunModel5 into the database. Please help me with this
  1 个评论
Harish M Y
Harish M Y 2021-7-19
Hey one more thing, the RunModel5 is the .m file which is also selected byy the user for first time and the RunModel5 is to be stored afterwards.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by