How can I get all sub-ID's results from Model Advisor check by API?

I want to use the API to retrieve all results from Model Advisor checks using a JSON file containing multiple sub-ID in Simulink Check R2025b.  However, when attempting to retrieve them using the getCheckresult function, only the results for the last sub-ID are obtained.
How can I retrieve results for all sub-IDs?

 Accepted Answer

You can use "getCheckResults" on the result user got from ModelAdvisor.run. Following is the correct way to get the result of a check for all instances:
a_system = 'test_model';
a_json_name = 'sample.json';
load_system(a_system);
r_ret = ModelAdvisor.run(a_system, 'Configuration', a_json_name);
check_res = r_ret{1}.getCheckResults('mathworks.jmaab_v6.na_0011');

More Answers (0)

Categories

Products

Release

R2025b

Community Treasure Hunt

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

Start Hunting!