User`s guide

Organize Customization File Checks and Folders
26-15
Add Check to Custom or Multiple Folders Using Tasks
You can use custom tasks for adding checks to the Model Advisor, either in multiple
folders or in a single, custom folder. You define custom tasks in one or more functions
that specify the properties of each instance of the ModelAdvisor.Task class. Define one
instance of this class for each custom task that you want to add to the Model Advisor.
Then register the custom task, as described in “Register Tasks and Folders” on page
26-13. The following sections describe how to define custom tasks.
To add a check to multiple folders or a single, custom folder:
1
Create a check using the ModelAdvisor.Check class, as described in “Define
Custom Checks”.
2
Register a task wrapper for the check, as described in “Register Tasks and Folders”
on page 26-13.
3
If you want to add the check to folders that are not already present, register and
create the folders using the ModelAdvisor.Group class.
4
Add a check to the task using the ModelAdvisor.Task.setCheck method.
5
Add the task to each folder using the ModelAdvisor.Group.addTask method and
the task ID.
Create Custom Tasks Using MathWorks Checks
You can add MathWorks checks to your custom folders by defining the checks as custom
tasks. When you add the checks as custom tasks, you identify checks by the check ID.
To find MathWorks check IDs:
1
In the Model Advisor, select View > Source tab.
2
Navigate to the folder that contains the MathWorks check.
3
In the right pane, click Source. The Model Advisor displays the Title, TitleID, and
Source information for each check in the folder.
4
Select and copy the TitleID of the check that you want to add as a task.
Display and Enable Tasks
The Visible, Enable, and Value properties interact the same way for tasks as they do
for checks (see “Display and Enable Checks”).