Description This subroutine sets the algorithm for an Aperture Curve Collection, determining how the member curves are logically combined. Please see the Aperture Curve Collection topic.
Syntax SetApertureCurveAlgorithm( cNode, algo )
Parameters cNode As Long Node number of the Aperture Curve Collection whose algorithm is being set.
algo As Long This parameter specifies the algorithm to be used. Valid options are:
Example The example below shows how to retrieve the current algorithm setting from an aperture curve collection and then enter a loop which iterates over the available algorithms, traces and performs an irradiance analysis and displays the result.
Sub Main
DeleteRays() ARNDeleteAllNodes() ClearOutputWindow()
Dim cNode As Long cNode = FindFullName( "Geometry.Complex Aperture.Ap Curve" )
Dim ana As Long ana = FindFullName( "Analysis Surface(s).Detector" )
'Retrieve the current algorithm Dim algo As Long algo = GetApertureCurveAlgorithm( cNode ) Print "Current ap curve algorithm = " & algo Print ""
'Loop over the algorithms, trace, calculate the irradiance and display Dim arn As Long For algo = 1 To 3
SetApertureCurveAlgorithm( cNode, algo ) Update
EnableTextPrinting(False) DeleteRays() TraceCreate() IrradianceToARN( ana, "Algorithm " & algo, arn ) EnableTextPrinting(True)
Print "Displaying result from algorithm " & algo ARNDisplayInChart( arn, "" )
Next
End Sub
See Also
|