Open Upgrade Advisor
upgradeadvisor('modelname')
upgrader = upgradeadvisor('modelname')
upgradeadvisor('modelname')
opens the Upgrade
Advisor for the model specified by modelname
.
This command loads the model if necessary, but does not open it in
the Simulink® Editor. Use the Upgrade Advisor to help you upgrade
and improve models with the current release.
upgrader = upgradeadvisor('modelname')
returns
an object that you can use to analyze and upgrade a hierarchy of models
programmatically. If you specify an output, then the Upgrade Advisor
does not open. You can use the methods analyze
and upgrade
with
the upgrader
object output of the upgradeadvisor
function.
To programmatically analyze a model for recommended
upgrades, create an upgrader
object and use the
method analyze
.
To programmatically analyze and upgrade a model, create
an upgrader
object and use the method upgrade
.
To configure options before running analyze or upgrade, see Examples.
Tip
For an example showing how to programmatically upgrade a whole project, see Upgrade Simulink Models Using a Project.
|
Name or handle to the model, specified as a character vector. |
|
Object for analyzing and upgrading the hierarchy of models programmatically. |
To open the Upgrade Advisor on the vdp
example
model:
upgradeadvisor('vdp')
To open the Upgrade Advisor on the currently selected model:
upgradeadvisor(bdroot)
Get an upgrader
object. This example
uses a writable copy of the vdp
model.
load_system('vdp'); save_system('vdp',fullfile(tempdir, 'myvdp')) upgrader = upgradeadvisor('myvdp')
upgrader = Upgrader with properties: ChecksToSkip: {} SkipLibraries: 0 SkipBlocksets: 1 OneLevelOnly: 0 ShowReport: 1 RootModel: 'myvdp' ReportFile: ''
To analyze the model for recommended upgrades, following library links and model references, run:
analyze(upgrader);
To analyze the model and automatically fix all issues (where automated fixes are available), run:
upgrade(upgrader);
This command follows library links and model references, and saves any fixes to the model files.
You see a report of issues found and actions taken.
To find the location of the report:
reportLocation = upgrader.ReportFile
You can configure options before running analyze or upgrade.
Specify checks to skip before running analyze or upgrade. Find the ID for a check in the
Upgrade Advisor by right-clicking the check and selecting Send Check ID
to Workspace. Then set the upgrader.ChecksToSkip
property. For
example:
upgrader.ChecksToSkip = {'mathworks.design.CSStoVSSConvert'}; upgrade(upgrader);
Specify running the Upgrade Advisor on only the current model without following library links or model references:
upgrader.OneLevelOnly = true; % default false
Specify running the Upgrade Advisor on the current model, following model references but not library links:
upgrader.SkipLibraries = true; % default false
Specify running the Upgrade Advisor on the current model, including upgrading files in blocksets or toolboxes:
upgrader.SkipBlocksets = false; % default true
ver
and
the existence of a Contents.m
file.To turn off showing the report after analyze or upgrade, set:
upgrader.ShowReport = false; % default true
Tip
For an example showing how to programmatically upgrade a whole project, see Upgrade Simulink Models Using a Project.
The Upgrade Advisor can identify cases where you can benefit by changing your model to use new features and settings in Simulink. The Advisor provides advice for transitioning to new technologies, and upgrading a model hierarchy.
The Upgrade Advisor can also identify cases where a model will not work because changes and improvements in Simulink require changes to a model.
The Upgrade Advisor offers options to perform recommended actions automatically or instructions for manual fixes.
You can also open the Upgrade Advisor from the Simulink Editor. In the Modeling tab, select Model Advisor > Upgrade Advisor.
Alternatively, you can open the Upgrade Advisor from the Model
Advisor. In the Model Advisor, under By Task
checks,
expand the folder Upgrading to the Current Simulink Version
and
select the check Open the Upgrade Advisor
.