Calculation Manager - Edit Calculation - Script
- Updated2024-09-12
- 4 minute(s) read
DIAdem ANALYSIS > Calculations > Edit Calculations > Calculation Manager - Edit Calculation - Script
Calculation Manager - Edit Calculation - Script
Use this dialog box to create or to edit a script for a calculation.
With a script you can execute mathematical operations on channels and single values and use all functions of the calculator as well as active user commands.
Settings
Toolbar |
||
![]() |
Description | Specifies the calculation description. |
![]() |
Validation Successful | Checks whether DIAdem can execute the script. DIAdem displays the test result as a message. |
![]() |
Validation Unsuccessful | |
![]() |
Run | Executes the calculation. If DIAdem generates result channels, the channels are in the Data Portal. |
![]() |
Run and Store in Calculation Channel | Runs the calculation and stores the result in a calculation channel. |
Calculation script |
||
| Name | Specifies the calculation name. | |
| Description | Specifies the calculation description. | |
| Calculation Script | Specifies the script that is to be executed. To calculate a formula within the calculation script, use the Calculate command. You can use a script to define multiline calculation rules. You specify the font of the script in the Font dialog box of the script editor of DIAdem SCRIPT. |
|
| Validation Script | Specifies the validation script that is to be executed. You specify the font of the script in the Font dialog box of the script editor of DIAdem SCRIPT. |
|
![]() |
Copy Script to Clipboard | Copies the calculation settings to the clipboard. Copy the contents of the clipboard to the script editor in DIAdem SCRIPT to edit the calculation script using the editing functions. Then copy the VBS code between "Calculation script begin" and "Calculation script end" from the edited and tested script and paste this code into the the calculation script of the calculation. |
| Quantity-based | Specifies that DIAdem executes the calculation quantity-based. Refer to the Help page Calculating Quantity-Based and Non-Quantity-Based in DIAdem for the conditions and rules for quantity-based calculations. | |
| Cycles | Specifies the number of cycles for this calculation. | |
Toolbars for Inputs and Outputs |
||
![]() |
Add Input/Output | Creates a new entry in the list of inputs or outputs. |
![]() |
Delete Input/Output | Deletes the selected input or output. |
![]() |
Move Input/Output Up | Moves the selected input or output up one position. |
![]() |
Move Input/Output Down | Moves the selected input or output down one position. |
Inputs |
||
| Name | Specifies the name of the input. You use the name of an input as a symbol in the formula. | |
| Dependency | Contains a message as to whether the input is dependent on an output from another calculation. Click into the table entry to open the dialog box where you define the dependency of an input on an output of another calculation. | |
| Optional Input | Specifies that DIAdem uses the input when validating the calculation rule. Click into this table entry to flag the input as optional. | |
| Data type | Specifies the data type of the input. An input can refer to a value, a channel, or a channel list. | |
| Reference | Contains details on the value, the channel, or the channel list that the input refers to. Click the table entry to open the dialog box where you define the Value reference or the Channel list reference of the input. If you define several cycles for the calculation, use the expression @@CCR@@ in the reference of the input. DIAdem replaces the expression with the current cycle number after each calculation cycle. This gives you variable inputs. |
|
Outputs |
||
| Name | Specifies the name of the output. You use the name of an output as a symbol in the formula. | |
| Optional Output | Specifies that DIAdem uses the output when validating the calculation rule. Click into this table entry to flag the output as optional. | |
| Data type | Specifies the data type of the output. An output can refer to a value, a channel, or a channel list. | |
| Reference | Contains details on the value, the channel, or the channel list that the output refers to. Click the table entry to open the dialog box where you define the Value reference or the Channel list reference of the output. If you define several cycles for the calculation, use the expression @@CCR@@ in the reference of the output. DIAdem replaces the expression with the current cycle number after each calculation cycle. This gives you variable outputs. |
|
| Message | Indicates whether DIAdem can execute the calculation. | |
Further Settings
Calculation Manager | Run Calculation | Edit Calculation»Calculation | Edit Calculation»Script | Add Calculation Group | Debug Dependent Pre-Calculations | Debug Dependent Post-Calculations









