Description This function moves the active slice from one ARN into another ARN and returns the index at which the slice was added to the destination ARN. The active slice of the source ARN is automatically set to zero.
Syntax idx = ARNMoveSliceFromARN( srcARN, dstARN )
Parameters idx (Long) Returned value indicating the index of the newly added slice in dstARN.
srcARN As Long Node number of the ARN from which the active slice is being moved.
dstARN As Long Node number of the ARN into which the slice from srcARN is to be added.
Example The example below loops over all slices of one ARN (ms2, below) and moves any slices representing Irradiance data into another ARN (ms1, below).
Sub Main
Dim ms1 As Long, ms2 As Long ms1 = ARNFindName( "Multi-slice ARN 1" ) ms2 = ARNFindName( "Multi-slice ARN 2" )
Dim scount As Long scount = ARNGetSliceCount( ms2 )
Dim curSlice As Long, dstIdx As Long, atitle As String For curSlice = scount-1 To 0 Step -1 ARNSetActiveSlice( ms2, curSlice ) If ARNGetPhysicalMeaning( ms2 ) = "Irradiance" Then atitle = ARNGetTitle( ms2 ) dstIdx = ARNMoveSliceFromARN( ms2, ms1 ) Print "Moved " & atitle & " to index " & dstIdx & " in ARN " & ARNGetName( ms1 ) End If Next
End Sub
See Also
|