Description Sets the data array values for an Analysis Results Node (ARN).
Syntax ARNSetDataAsDoubleArray nNodeNum, data
Parameters nNodeNum As Long Node number of existing ARN whose array values are being set.
data() As Double Array of values being set to the ARN.
Example The example below defines a custom Function called ARNDivide whose input arguments, in_arn1 and in_arn2, are the node numbers of two ARNs. The function performs a cell-wise division of the two arrays and stores the resulting data in the ARN referenced by in_arn1.
Function ARNDivide( ByVal in_arn1 As Long, ByVal in_arn2 As Long ) As Boolean
'Performs a cell-wise division of in_arn1 / in_arn2 'Assumes both ARNs are same dimensionality 'Result stored in in_arn1
Dim data1() As Double, data2() As Double, adim As Long, bdim As Long ARNGetDataAsDoubleArray( in_arn1, data1() ) ARNGetDataAsDoubleArray( in_arn2, data2() ) adim = ARNGetAAxisDim( in_arn1 ) bdim = ARNGetBAxisDim( in_arn1 )
Dim curA As Long, curB As Long For curA = 0 To adim-1 For curB = 0 To bdim-1 data1(curA,curB) /= data2(curA,curB) Next Next
'Send data back to ARN ARNSetDataAsDoubleArray( in_arn1, data1() )
Return True
End Function
See Also
|