1. Advanced concepts

1.1. Export data to clipboard

image

In the pop-up menu in all tables you can select Export > to clipboard. This enables you to paste the full content of a table into a document.
The format that is used is the same as used when you create objects from file or clipboard (see under).

1.2. Import data from clipboard

In the pop-up menu in all tables you can select Import > from clipboard. This enables you to paste values on existing objects in a table.

1.3. Advanced import of data

Typically the customer supplies a list of data to be imported into the program. Let us say you get a list of slender elements where each slender element consist of a 20 or more different values.
The slender elements list editor does not necessarily match this list in it’s default mode. To customize the table you can click the drop down arrow of the cog wheel icon below the editor or right click inside the table and select Customize table to get a list of all available features to include in the table. Last but not least you have to change the sequence of the input data to match the customized table.

PS! Do not alter the sequence of table columns before importing data since the underlying structure in the table does not change when moving columns.

image

1.4. Create objects from file or clipboard

image

1.4.1. From Clipboard

The create from clipboard command enables you to create new model objects from data on the clipboard. Let’s say you receive a document from a customer where there is listed objects with name and position data and so forth. If you copy these data you may use the create command to quickly create these objects in the workspace.

1.4.2. From File

The create from file command enables you to create new objects from data on text files. Let’s say you receive a document from a customer where there is listed objects with name and position data and so forth. If you open this document with the create from file command the objects are created in the table you are positioned. Make sure the file follows the file format accepted by this command.

File format: Files containing plain ascii text, delimited by space, tab, semicolon or comma are accepted. File names and other string objects which may contain spaces must be surrounded by double quotes to be handled as one item.

A file containing SIMO bodies could look like this:

#
# SIMO bodies to be created
#
TROLL "Large volume" 10.0 0.0 0.0 0.0 0.0 0.0
HOOK "Small volume" 12 3.9 20.4 0.0 0.0 0.0

1.5. Duplicate views

In the upper right corner of an editor there is a Duplicate View icon. When you click on this icon a clone is created. By clicking the original editor and hitting Ctrl+Shift+Up / Ctrl+Shift+Down you can switch to any other object of the same type in the editor. This way you can compare two or more objects (You can create more than one clone from the original editor).

image

1.6. Variables

You can create variables and assign them to an object value. In the picture below we have created two variables; HS (wave height) and TP (wave period). HS has been assigned to the significant wave height and TP has been assigned to the peak period in the wind wave object of the environment (You assign a variable to an object value by right clicking the value without entering the edit mode first and select set script from the pop-up menu).

image

A good example where using variables comes in handy is when setting up a condition space. Here you get access to all your defined variables and may define as many value combinations as needed for this case.

In the case shown below, the user has defined 3 variations of HS and 3 variations of TP, and by this specifying 9 runs.

image

After all runs are done you end up with a list of results in your condition space where the name of the result folder matches the full combination of variables you set up in your condition space.

image

1.6.1. Integer Variable

An integer variable is typically used to vary an integer number over the conditions that are defined.
You can assign an integer variable to an integer field by using the Set script pop-up menu item or clicking Ctrl+2 in the field.
In the condition editor you can assign values to this integer variable.

1.6.2. Double Variable

A double variable is typically used to vary a number over the conditions that are defined.
You can assign a double variable to a double precision field by using the Set script pop-up menu item or clicking Ctrl+2 in the field.
In the condition editor you can assign values to this double variable.

1.6.3. String Variable

A string variable is typically used to vary a file path over the conditions that are defined.
You can assign a string variable to a string field by using the Set script pop-up menu item or clicking Ctrl+2 in the field.
In the condition editor you can assign values to this string variable.

1.7. Scriptable values / scripts

You can define variables in a task for different purposes. One purpose could be to vary wave height and wave period thus creating a set or space (matrix) of weather conditions to be used in condition sets or condition spaces. Another purpose could be to connect objects to each other. For instance you could say that a body always should be positioned at another body’s position + 50 meters in the x-axis. This has the effect that if the other body is moved the first body that has the scriptable value attached to it also will move according to the given formula.

First create the variables you need, that being double, integer or string variables.

image

It is also possible to create a new variable from an existing value in a double, integer, or string field.

Right-click the wanted value (in grids you need to be editing the value when right-clicking) and select set as variable. In the subsequent dialogue you need to specify a name for the new variable. The new variable will be created using the selected value and it will be assigned as script.

image

Use the variables to create scripts in your model. Note that fields where a script has been set has a changed background color.

To open the scripts editor use the keys Ctrl+2 or right click the field and select Set script.
If you use the mouse to hover over a scripted field you will get a tooltip showing the script which results in the displayed value.

image

There is included support for using a Java Math library.

This enables you to create mathematical expression in your scripts.

image

Note that you do not have to write Math. in front of the function you would like to use.

Inside the script editor you may use Ctrl+space to show the list of available objects to use in your script.

When you have selected an object and want to dig deeper - add a . and use Ctrl+space to get a list of the current available objects.

image