Main Content

getValue

Class: Simulink.dialog.parameter.CustomTable
Namespace: Simulink.dialog.parameter

Get value of a table cell

Syntax

tableCellValue = tableControl.getValue([rowIdx colIdx])

Description

tableCellValue = tableControl.getValue([rowIdx colIdx]) gets the value of a cell in a custom table.

Input Arguments

expand all

Handle to the custom table, specified as an object. You can use the getDialogControl command to get the custom table handle. For more information, see Simulink.dialog.Container.getDialogControl.

Consider, for example, tableControl = maskObj.getDialogControl(TableName). Here, maskObj is the mask object and TableName is the name of the custom table.

Data Types: numeric array

Row index number of the custom table cell for which the value is being fetched.

For example, [2 2].

Column index number of the custom table cell for which the value is being fetched.

For example, [2 2].

Output Arguments

expand all

Value of the table cell, returned as a character vector.

Examples

% Get block mask handle.
maskObj = Simulink.Mask.get(gcb); 

% Get custom table handle.
tableControl = maskObj.getDialogControl('myTable');

% Get cell value.
tableCellValue = tableControl.getValue([2 2]); 

ans = 
  'Input'

Version History

Introduced in R2019a