ModelAdvisor.Check
R2026bCreate custom Model Advisor checks
Description
Use the ModelAdvisor.Check class to define
custom checks that appear in the Model Advisor tree, configure their
callback functions and input parameters, and control how results are
displayed.
Creation
Description
check_obj = ModelAdvisor.Check(
creates a check object, check_ID)check_obj, using
the identifier specified by check_ID.
To display checks in the Model Advisor tree, the checks must
have an associated ModelAdvisor.Task or ModelAdvisor.Root object.
You can use one ModelAdvisor.Check object
in multiple ModelAdvisor.Task objects,
allowing you to place the same check in multiple locations
in the Model Advisor tree. For example, Check for
implicit signal resolution is displayed
in the By Product > Simulink folder and in the By Task > Model Referencing folder in the Model Advisor tree.
When you use checks in task definitions, the following rules apply:
If you define the properties of the check in the check definition and the task definition functions, the Model Advisor only displays the information contained in the task definition. For example, if you define the name of the check using the
ModelAdvisor.Task.DisplayNameproperty and using theModelAdvisor.Check.Titleproperty, the Model Advisor displays the information provided inModelAdvisor.Task.DisplayName.If you define the properties of the check in the check definition but not the task definition, the task uses the properties from the check. For example, if you define the name of the check in the check definition function using the
ModelAdvisor.Check.Titleproperty, and you register the check using a task definition, the Model Advisor displays the information provided inModelAdvisor.Check.Title.If you define the properties of the check in the task definition function but not the check definition function, the Model Advisor displays the information as long as you register the task with the Model Advisor instead of the check. For example, if you define the name of the check in the task definition using the
ModelAdvisor.Task.DisplayNameproperty instead of theModelAdvisor.Check.Titleproperty, and you register the check using a task definition, the Model Advisor displays the information provided inModelAdvisor.Task.DisplayName.
Input Arguments
Properties
Object Functions
getID | Return check identifier |
setAction | Specify action for check |
setHelp | Set custom help for custom authored Model Advisor checks |
setInputParameters | Specify input parameters for check |
setCallbackFcn | Specify callback function for check |
setInputParametersLayoutGrid | Specify layout grid for input parameters |
setResultDetails | Associates result details with a check object |
Version History
Introduced in R2008a