PasteIntoView

From Planimate Knowledge Base
Jump to: navigation, search

This operation enables the modeller to trigger importing of the current Windows clipboard into a table view.

It is intended to be invoked in a routine triggered by a cell click in a table view.

The operation takes the following parameters:

Table  : this should be an entire table reference

Panel  : A portal or panel label referring to the panel containing the view of the table.

TL Row/TL Col : These specify the top left cell into which data will be pasted

Options: Unused at the moment.

Rows Read/Cols Read : These specify the number of rows and columns read from the clipboard.

Note: If an error occurs, then they refer to the cell where the error occured, relative to the

Return result: This is 0 if there were no errors, otherwise the following values are currently defined:

1: undefined error 2: error placing clipboard into temp file 3: disk full while writing clipboard 4: no data in clipboard 5: incomplete rows encountered 6: formatting problem for values 7: undefined label or label lookup failure


Notes: If the clipboard data extends past the columns in the table, the extra columns in the source data are ignored.

If the clipboard data extends past the rows in the table, new rows are appended to the table EXCEPT if a row filter is active, in which case the extra rows are ignored.

Views with customised column arrangements/formats are supported; the data is placed in the table according to the column arrangement of the view.

If the view has an active row filter, then the data is pasted into the rows that are currently visible as if they were contiguous.

Cell specific formats are recognised and used in formatting incoming data (including labels). This can assist in moving "report" type tables back into PL.

Free text cells are supported but not new lines etc within them.

Labels are added automatically unless the table column has the "Only Select Existing Labels" option or the label list has the "Only Modellers Add" option and the platform is in User Mode. In these cases, unexpected labels stop the import and return the undefined label error code.