Tools in Table input - copy and paste

Introduction

One of the most important functionalities is copy and paste content from/to the clipboard. This can be used for different types of applications – most probably MS Excel.

It allows you to create complex geometry (e.g. defined by some function) with many thousands of nodes and insert it into Table input in one step.

Copy

Selected content is copied to the clipboard by the context menu (item Copy) or by a standard short-cut CTRL+C. Afterwards, the content of clipboard can be inserted e.g. to MS Excel. To allow clear overview of the copied entities, the table header is stored in the clipboard together with the copied data.

Paste

Pasting the selected content back to the table is also possible using the context menu (item Paste) or by a standard short-cut CTRL+V. Data to be pasted can be prepared e.g. in MS Excel. The inserted data may start with the table header as the first line.

Technical details

In this chapter there is brief description how does the pasting of data from clipboard works internally. This knowledge is not important for using the Table input, but it is good for understanding some issues which may arise.

Table input is intended to allow to paste huge amount of data in a batch. We are able to input e.g. 20 000 nodes in less than one minute. There are 2 contradictory requests: to do it quickly and to guarantee that inputted data are consistent. The first requests implies that ideally there is no data check that makes the code execution time demanding. The second requests implies that there should be many checks of input data to guarantee that project won't be damaged by inputting wrong data set. It is good to realize that finding good balance of these two requests is not easy.

We can distinguish two basic operations that can also be combined. The first one is related just to editing the actual data, no new entity is created. The second one regards creating new entities on tabs with the "New row (= new member)". The third is combination of them.

1) Pasting data to modify actual entities

In this case the algorithm goes through particular cells one by one (from left to right, from top to down) and if old and new value differ it just try to set new value. Sometimes it happens that new value cannot be set (e.g. due to geometrical check or input value is out of range) at the time. If some value was not successfully changed, at the end of every row the algorithm tries to set those values once again. If the change was not successful even during the second try, algorithm returns warning message (if the entity returns some message) and jump to the next row.

Preceding description implies that if the operation is interrupted by the button beside the progress bar the all already finished changes are accepted.

If editing of some property of some entity causes some warning message, this message is remembered and all messages from the whole editing process are displayed in one summarizing warning message in the end.

2) Pasting data to create new entities using the "New row"

Firstly all new entities are internally created with some default values of properties and than they are written into data-server in one step. If this operation is interrupted the whole operation is cancelled and no entity is created.

The second step is to modify newly created entities and set values defined in clipboard in the way described in "1) Pasting data to modify actual entities".

3) Pasting data both to modify actual entities and creating new entities

In the first step actual entities are edited [1) Pasting data to modify actual entities].

In the second step new entities are created and edited [2) Pasting data to create new entities using the "New row"].