It is much more likely that you would import these data into OrcaFlex from some external source and then save it as part of the base case data file. However, it is worth pointing out that situations where you would wish to specify RAO table data in a batch script are rare. You may specify either the index of the direction in the list of all directions for that type, or the value of the direction. In addition, when setting RAO table data (for displacement RAOs, wave load RAOs and wave drift QTFs) you must specify to which direction the data apply. Note that the variable names RAOOriginX etc are the same in each case, but different data are set depending on which type of RAOs has been selected. To set data for displacement RAOs, wave load RAOs, wave drift QTFs and sum frequency QTFs you must also specify to which type of RAO the data apply. However, the majority of vessel type data require that you also specify to which draught the data apply: Some vessel type data are set in a straightforward manner as follows: Again this requires the alternative syntax for select using either name or index, as shown below:ĪctiveCurrent = "150deg" Vessel type data Multiple current data sets can be defined. UserDefinedResultScriptFileName = UserDefinedResult.py Data for current data sets
#Orcaflex spreadsheet api disable how to#
The example below shows how to modify the script file name for the user defined result named Result3: To modify existing user defined results they must first be selected. PostCalculationActionScriptFileName = PostCalculationAction.py Data for user defined results The example below shows how to modify the script file name for the post calculation action named Action3: To modify existing post calculation actions they must first be selected. Note that this index, as other indices in batch script, is 1-based: the first entry in the list has index 1. For instance, if the wave train named "Swell from SW" is the first in the list and "Local wind sea" is the second, then the following script would have exactly the same effect as the previous example: You may also use the syntax Select Index, where is the index of the required wave train in the list held by the environment and displayed on the environment data form. For a wave train you replace with Wave and replace with the name of the wave train as defined on the environment data form. This makes use of the alternative syntax for Select which is Select. OuterTimeStep = 0.1 Data found on the environment data formĭata found on the environment data form can be set as follows:įor data specific to a particular wave train you must first select the environment and then select the particular wave train. Moment = 0.5 Data found on the general data formĭata found on the general data form can be set as follows: These data are also set by first selecting the type by name and then assigning the data. Similar rules apply to clump type data and to flex joint type data. You cannot set line type data using index notation. However, these data must be set by first selecting the type by name and then assigning the data. When viewing for all line types at once, the data appear in tables with one row per line type. On the line types data form there is an option to view the data for all line types at once or to view by individual line type. These data are set by first selecting the type by name and then assigning the data: Having stated this rule, we immediately break it in the following section! Line type, clump type and flex joint type data This is not essential but makes reading the script easier.ĭata which appear in tables are always set using this indexed notation. Note that we use blank lines to lay out the script. The following example sets the number of sections of the line to be 2 and then sets data for both sections in turn. Each section is specified by its line type, length etc. For example consider the Structure page of the line data form which specifies how a line is made up of a number of sections. If the name contains a double quote and spaces then it should be enclosed with single quotes. The name "3D buoy1" needs to be enclosed in quotes because it contains a space. The variable name is found by opening the relevant data form, selecting the required data item and pressing F7. The object name is most easily found in the model browser. Set the data using one or more commands of the form VariableName = Value.Select the object using the command Select.Simple examplesįor many objects the script commands for setting data take the form: To help understand how it works we present some examples of its use. The Select command is probably the most difficult script command to use. Batch processing: Examples of setting data