User`s guide
25 Create Model Advisor Checks
25-50
• After both instances of searchResult =
mdladvObj.filterResultWithExclusion(searchResult);, add
searchResult = setdiff(allBlks, regularBlks);.
• In the first location, the function now looks like:
% find regular font name blocks
regularBlks = find_system(allBlks,'FontName',regularFontName);
% look for different font blocks in the system
searchResult = setdiff(allBlks, regularBlks);
searchResult = mdladvObj.filterResultWithExclusion(searchResult);
if ~isempty(searchResult)
• In the second location, the function now looks like:
% find regular font size blocks
regularBlks = find_system(allBlks,'FontSize',regularFontSize);
% look for different font size blocks in the system
searchResult = setdiff(allBlks, regularBlks);
searchResult = mdladvObj.filterResultWithExclusion(searchResult);
if ~isempty(searchResult)
4
Save the sl_customization.m file. If you are asked if it is ok to overwrite the file,
click OK.
5
In the model window, double-click Launch Model Advisor.
6
If the By Product folder is not displayed in the Model Advisor window, select Show
By Product Folder from the Settings > Preferences dialog box.
7
In the left pane of the Model Advisor window, select the By Product > Demo >
Check Simulink block font check. In the right pane, select Run This Check. The
check fails.
8
In the Model Advisor window, click the Enable highlighting button ( ). The
blocks causing the Check Simulink block font check failure are highlighted in
yellow.
9
In the model window, right-click the X block and select Model Advisor > Exclude
block only > Check Simulink block font.
10
In the Model Advisor Exclusion Editor, click OK to create the exclusion file.
Additionally, in the Save Exclusion File as dialog box, click Save to create an
exclusion file with the default name slvnvdemo_mdladv_exclusions.xml.