insertList

Syntax

<Path>.insertList(Cell:integer,SourceList:any)
<Path>.insertList(Column:integer,Row:integer,SourceList:any)

The method insertList inserts the contents of a list into a DataTable or a DataList. Plant Simulation deletes existing data in a table. In a list it moves the data to another position.

Note:

Copying a large amount of data from one list to another with the method insertList might be slow. For objects of type DataTable we recommend to the use the method copyRangeTo instead, whose code is executed much faster.

Parameters

  • For the DataList the parameter Cell of data type integer designates the cell from which on Plant Simulation inserts the contents of the list.

  • For the DataTable the parameter Column of data type integer designates the column of the cell from which on Plant Simulationinserts the contents of the list.

  • For the DataTable the parameter Row of data type integer designates the row of the cell from which on Plant Simulation inserts the contents of the list.

  • The parameter SourceList of data type any designates the contents of the list that is going to be inserted.

Plant Simulation deletes all existing entries in a table, but moves entries in lists to another position.

Example

var lst: list [string]
lst.create -- create
lst.insert(1,"one") -- enters value
lst.insert(2,"two")
MyDataList.insertList(3,lst)
DataTable.insertList(2,2,lst)