DIAdem Help

Method: AddCalculationChannelRef for Channels <Data>

  • Updated2024-09-12
  • 1 minute(s) read

Method: AddCalculationChannelRef for Channels <Data>

Generates a new calculation channel with a reference to a calculation of the calculation manager in the script interface for internal data. Use the AddCalculationChannel method to create a new calculation channel using a simple one-line formula.

Set oCalculationChannel = Object.AddCalculationChannelRef(CalculationReference, [DestIndex])
ObjectChannels <Data>
Object with this method
CalculationReferenceString
Specifies the reference to a calculation. You specify the reference with the GetReference for CalculationChannel <Data> method.
[DestIndex]LongInteger
Specifies the index of the new calculation channel within the collection of existing channels. If you do not specify the index, DIAdem appends the calculation channel to the collection of existing channels in the channel group.
oCalculationChannelCalculationChannel <Data>
Returned object

The following example generates a calculation channel using the calculation manager:

VBScriptPython

 

Dim oMyCalculationChn, sMyCalculationReference
Call CalculationSet.Load("Example.tca")
sMyCalculationReference = CalculationSet.CalculationGroups(1).Calculations(1).GetReference()
Set oMyCalculationChn = Data.Root.ChannelGroups(1).Channels.AddCalculationChannelRef(sMyCalculationReference, 1)

Log in to get a better experience