Navigation: Scripting Reference Manual > Functions & Subroutines > ARNComputeSum

 

ARNComputeSum

 

Contact Us: fredsupport@photonengr.com

 

Description

Returns the sum of all cell values in a 2D ARN.

 

Syntax

dSum = ARNComputeSum( arn )

 

Parameters

dSum (Double)

Return value corresponding to the sum of all cell values in the ARN.

 

arn As long

Node number of the ARN whose sum is being computed.

 

Example

The following example performs a raytrace, performs an Intensity on Polar Grid analysis and then calculates the average intensity value for the result.

 

Sub Main

 

    DeleteRays()

    ARNDeleteAllNodes()

    TraceCreate()

 

    Dim iarn As Long, iana As Long

    iana = FindFullName( "Analysis Surface(s).DAE" )

    IntensityToARN(iana, "Intensity DAE", iarn )

 

    Dim iave As Double

    iave = ARNComputeSum(iarn)/(ARNGetAAxisDim(iarn)*ARNGetBAxisDim(iarn))

    Print "Average intensity = " & iave

 

End Sub

 

See Also

All ARN Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC