Navigation: Scripting Reference Manual > Functions & Subroutines > ARNCreateSliceCopy

 

ARNCreateSliceCopy

 

Contact Us: fredsupport@photonengr.com

 

Description

This function copies the active slice from one ARN into another ARN and returns the index of the newly added slice in the destination ARN.  The newly added slice in the destination ARN is made the active slice.

 

Syntax

idx = ARNCreateSliceCopy( srcARN, dstARN )

 

Parameters

idx (Long)

Returned value indicating the index of the newly added slice in dstARN.  The newly added slice is made the active slice of dstARN.

 

srcARN As Long

Node number of the ARN from which the active slice is being copied.

 

dstARN As Long

Node number of the ARN into which the copied slice from srcARN is to be added.

 

Example

The example below loops over all slices of one ARN (ms2, below) and copies 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

    For curSlice = scount-1 To 0 Step -1

        ARNSetActiveSlice( ms2, curSlice )

        If ARNGetPhysicalMeaning( ms2 ) = "Irradiance" Then

            dstIdx = ARNCreateSliceCopy( ms2, ms1 )

            Print "Copied " & ARNGetTitle( ms2 ) & " to index " & dstIdx & " in ARN " & ARNGetName( ms1 )

        End If

    Next

 

End Sub

 

 

See Also

All ARN Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC