MMpy.DataGrid.set_cell

Syntax

datagrid.set_cell(column, row, value)

Description

Sets the value of a specific cell in the data grid.

Parameters

Name
Type
Description

column 

int The column index.

row 

int The row index.

value 

any The value to assign to the cell.

See Also

MMpy.DataGrid.get_cell

Notes

If the value type cannot be handled by the block model, a ValueError exception will be raised.

Column and row indexes are 0-based, meaning passing an index of 0 for both will return the first cell.

Examples

datagrid = MMpy.DataGrid(...)
...
datagrid.set_cell(0, 0, 22.0 / 7.0)

Resource ID

IDPH_DATAGRID_SET_CELL