Description This function returns the index of the active slice in an ARN.
Syntax idx = ARNGetActiveSlice( arn )
Parameters idx (Long) Returned value indicating the active slice of the ARN being queried.
arn As Long Node number of the ARN whose active slice index is being queried.
Example The example below loops over all slices in a multi-slice ARN and removes any slice for which the sum of all cell values in its data grid is zero.
Sub Main
Dim msarn As Long msarn = ARNFindName( "Multi-slice ARN 1" )
Dim scount As Long, curSlice As Long scount = ARNGetSliceCount( msarn ) 'Loop over all slices of the ARN in reverse order For curSlice = scount-1 To 0 Step -1 ARNSetActiveSlice( msarn, curSlice )
'Does the active slice contain any non-zero cells? If ARNComputeSum( msarn ) = 0 Then Print "Removing slice at index " & ARNGetActiveSlice( msarn ) & ": " & ARNGetTitle( msarn ) ARNRemoveSlice( msarn ) End If
Next
End Sub
See Also
|