ModelAdvisor.InputParameter - Add input parameters to custom checks

Class Description

You specify the input parameters a custom check uses in analyzing the model. Users access input parameters in the Model Advisor window.

Syntax

input_param = ModelAdvisor.InputParameter

Arguments

input_param

A variable representing the input parameter object you create.

Method Summary

NameDescription
setColSpanSpecify columns parameter occupies
setRowSpanSpecify rows parameter occupies

Methods

setColSpan

Purpose

Specify columns parameter occupies

Syntax

input_param.setColSpan([start_col end_col])

Arguments

input_param

A variable representing the input parameter object.

start_col

A positive integer representing the first column the input parameter occupies in the layout grid.

end_col

A positive integer representing the last column the input parameter occupies in the layout grid.

Description

Specify the number of columns the parameter occupies. Use this method to specify where an input parameter is located in the layout grid when there are multiple input parameters.

See Also

setInputParametersLayoutGrid

setRowSpan

Purpose

Specify rows parameter occupies

Syntax

input_param.setRowSpan([start_row end_row])

Arguments

input_param

A variable representing the input parameter object.

start_row

A positive integer representing the first row the input parameter occupies in the layout grid.

end_row

A positive integer representing the last row the input parameter occupies in the layout grid.

Description

Specify the number of rows the parameter occupies. Use this method to specify where an input parameter is located in the layout grid when there are multiple input parameters.

See Also

setInputParametersLayoutGrid

Example

See Demo and Code Example for more information.

rec = ModelAdvisor.Check('com.mathworks.sample.Check1');
rec.setInputParametersLayoutGrid([3 2]);
% define input parameters
inputParam1 = ModelAdvisor.InputParameter;
inputParam1.Name = 'Skip font checks.';
inputParam1.Type = 'Bool';
inputParam1.Value = false;
inputParam1.Description = 'sample tooltip';
inputParam1.setRowSpan([1 1]);
inputParam1.setColSpan([1 1]);
inputParam2 = ModelAdvisor.InputParameter;
inputParam2.Name = 'Standard font size';
inputParam2.Value='12';
inputParam2.Type='String';
inputParam2.Description='sample tooltip';
inputParam2.setRowSpan([2 2]);
inputParam2.setColSpan([1 1]);
inputParam3 = ModelAdvisor.InputParameter;
inputParam3.Name='Valid font';
inputParam3.Type='Combobox';
inputParam3.Description='sample tooltip';
inputParam3.Entries={'Arial', 'Arial Black'};
inputParam3.setRowSpan([2 2]);
inputParam3.setColSpan([2 2]);
rec.setInputParameters({inputParam1,inputParam2,inputParam3});

See Also

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS