Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Method: RunSelected for CalculationSet

DIAdem 2011 Help

Edition Date: July 2011

Part Number: 370859J-01

»View Product Info

Executes selected calculations. The Selected property of a calculation specifies whether the calculation is selected.

If a calculation requires an output from an other calculation as an input, DIAdem first executes the other calculation. DIAdem uses this method to specify the sequence in which calculations are to be executed, and automatically expands the volume of calculations to be executed, if required. If DIAdem cannot clearly determine the calculation order, DIAdem displays an error message.

DIAdem records the sequence of the executed calculations in the return value so that you can reproduce the calculation sequence.

If an error occurs in a calculation during the calculation, the error message contains information about the incorrect calculation. The previously executed calculations remain.

Use the Validate method of a calculation to execute the validation script of the respective calculation.

Set oCalculationList = Object.RunSelected([FailedCalculations], [RunMode])
ObjectCalculationSet
Object with this method
[FailedCalculations]CalculationList
Returned collection of failed calculations
[RunMode]Specifies whether DIAdem executes the subsequent calculations after an error has occurred.
Enumeration with the following selection terms:
8 eRunModeStopOnError DIAdem does not execute the subsequent calculations.
The method aborts with an error message.
16 eRunModeContinueOnError DIAdem executes the subsequent calculations.
At the end the method outputs an error message that names all failed calculations. If you execute the method after On Error Resume Next, you can call the error status and obtain the list with failed calculations from the FailedCalculations parameter.
oCalculationListCalculationList
Returned collection of executed calculations
VBS does not set the return value when an error occurs.

The following example executes specified calculations and then displays the name of the first executed calculation:

Dim oMyRunedCalculations
Set oMyRunedCalculations = CalculationSet.RunSelected
Call MsgBoxDisp("First calculation: " & oMyRunedCalculations(1).Name)


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit