Navigation: Scripting Reference Manual > Functions & Subroutines > ARNRemoveSlice

 

ARNRemoveSlice

 

Contact Us: fredsupport@photonengr.com

 

Description

This function removes the current active slice from a multi-slice ARN.

 

 

Syntax

idx = ARNRemoveSlice( arn )

 

 

Parameters

idx (Long)

Returned value indicating the new active slice of the ARN.  The value of idx will always be 0.

 

arn As Long

Node number of the ARN whose active slice is being removed.

 

 

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

All ARN Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC