STEM help / Editor skills

4.15.2 Copying and pasting fields

To copy data fields in a data dialog, you must first select the desired field or fields:

  1. hold down the <Shift> key to make a multiple selection of fields.

Then there are a number of ways to proceed:

  • select Copy from the dialog Edit menu, or
  • press <Ctrl+C> (when the dialog window is active).

To paste over a field, or selection of fields of the same type, again you must first select the desired fields, and then:

  • select Paste Link, Paste Formulae or Paste Values from the dialog Edit menu, or
  • press <Ctrl+V> (when the dialog window is active) to Paste Formulae.

For buttons representing inputs governed by several parameters, the Editor will ask whether to overwrite previously-set inner fields.

Note: Some buttons do not support copy and paste. When such a field is selected on its own, the Copy and Paste menu items are greyed, but you can copy a multiple selection including one of these fields, as STEM will skip it.

Copying multiple selections of fields

When a multiple selection is copied and pasted in a tabular dialog, the data are always identified by field.

STEM will automatically transpose the copied selection if necessary. For example, if you copy fields from one element, after flipping the axes of the dialog and then subsequently doing a paste, the paste will be transposed so that it runs over the fields of the current element, and not the same field for several elements.

If a multiple selection is copied and only a single field is selected later, STEM will paste if the single field can be automatically extended to a multiple selection matching the copied selection. Conversely, if only a single field is copied, STEM will paste over a multiple selection if all the selected fields are of the same type. More generally, STEM will paste if the target selection is either one cell or a multiple of the number of cells copied in each direction, if the effective paste selection matches the copy selection by type.

Using drag and drop to copy fields

You can use the drag-and-drop technique to copy and paste in a single operation:

  1. First select the fields you want to copy.
  2. Then hold down the <Ctrl> key, and drag with the mouse. The mouse cursor changes from the usual arrow to .
  3. When the cursor is over the top-left cell of a range of fields matching those copied, the cursor-grid fills in , to indicate that this is a valid range to paste over.
  4. Release the mouse button to complete the operation – the Editor will ask whether to paste links, formulae or values.

Figure 1: Copying a selection of fields with drag and drop

Note: You can only use drag and drop to copy fields within one dialog or table. If you want to copy data to a different dialog, use the Copy and Paste command from the Edit menus on the respective dialogs.

Copying relative formulae

If a field has a formula which refers to another field in the same element, e.g., Maintenance Cost = 0.1 * Capital Cost, and the first field’s formula is pasted onto another element, the copied formula will refer to the corresponding second field in the second element.

The only time STEM cannot move a formula reference in this way is if a formula refers to a nested field, such as a time series, which has an alternative construction to that in the second element.

If an input which is governed by several parameters, such as a time series, contains a formula, linking two of its fields, e.g., floor = (0.5 – multiplier)/(1 – multiplier), and formulae for the whole input are copied over another time series, the copied internal link will refer to the field inside the target input, rather than the field in the original input.

Copying and pasting text

If you want to copy text from the formula for a field, simply select the required text in the formula bar. This will put you into Edit Mode.

Whenever you are editing a formula, the standard Copy and Paste menu and keyboard commands change to act on the selected text. Additionally, you can cut text to the clipboard:

  • select Cut Text from the dialog Edit menu, or
  • press <Ctrl+X>.

You can also copy a whole dialog as text, including all the group and field labels:

  • select the button, or
  • select Copy All Text from the dialog Edit menu, or
  • press <Alt+A>.

See also 6.7 Copying text from formulae, data dialogs and notes.

Copying and pasting Interpolated Series

Time series can be exchanged directly with spreadsheets and other Interpolated Series dialogs.

Selection of Copy from the dialog Edit (or pressing <Ctrl> + C) will copy the selected cell or cells. This can then be pasted into a spreadsheet, or another time-series dialog, or to the windows clipboard, as required.

Figure 4: Interpolated Series copied into spreadsheet

Selection of Copy All Text from the dialog Edit (or pressing <Alt> + A) will copy all the values and labels. They can then be pasted into a spreadsheet, or another time-series dialog, or to the windows clipboard, as required.

Figure 5: Interpolated Series copied into Windows clipboard

 

© Implied Logic Limited