Navigation: Scripting Reference Manual > Functions & Subroutines > SourcePrimGetParmRayFan

 

SourcePrimGetParmRayFan

 

Contact Us: fredsupport@photonengr.com

 

Description

This function retrieves the configuration parameters from a Ray Fan type Source Primitive.  A boolean is returned indicating whether the parameters were successfully retrieved.

 

 

Syntax

success = SourcePrimGetParmRayFan( spNode, tFan )

 

 

Parameters

success (Boolean)

Returned boolean indicating whether the parameters were successfully retrieved from the source node.

 

spNode As Long

Node number of the Ray Fan type Source Primitive being queried.

 

tFan as T_SOURCEPRIMRAYFAN

After the function executes, this data structure contains the configuration parameters of the Ray Fan.

 

 

Example

The example below demonstrates how to retrieve the configuration parameters from a Ray Fan type Source Primitive using the T_SOURCEPRIMRAYFAN data structure.

 

Sub Main

 

    'Source primitive node being queried

    Dim spNode As Long

    spNode = FindFullName( "Optical Sources.Ray Fan" )

 

    'Retrieve configuration parameters

    Dim success As Boolean

    Dim tFan As T_SOURCEPRIMRAYFAN

    success = SourcePrimGetParmRayFan( spNode, tFan )

 

    'Report information to the output window

    If success Then

        Print "Configuration retrieved from source " & GetName( spNode )

        Print "Parameter" & Chr(9) & "Value"

        Print "Y fan?" & Chr(9) & CBool( tFan.AxisY )

        Print "Ray count" & Chr(9) & tFan.numRays

        Print "Power (watts)" & Chr(9) & tFan.PowerWatts

        Print "Along direction?" & Chr(9) & Not(CBool(tFan.RaySpec)) '0=Along direction, 1=From position

        Print "Reverse rays?" & Chr(9) & CBool(tFan.ReverseDir)

        Print "Semi-aperture" & Chr(9) & tFan.semi

        Print "Vector" & Chr(9) & tFan.Vec

    Else

        Print "Configuration parameters not retrieved from source node."

    End If

 

End Sub

 

 

See Also

Source Primitive Script Commands

Ray Fan

SourcePrimSetParmRayFan

T_SOURCEPRIMRAYFAN

 

 

 

 

 

Copyright © Photon Engineering, LLC