Navigation: Scripting Reference Manual > Functions & Subroutines > GetSourcePosImportedUseWavelengthsFromFile

 

GetSourcePosImportedUseWavelengthsFromFile

 

Contact Us: fredsupport@photonengr.com

 

Description

For a detailed source whose ray positions specification uses a ray file, this function gets the flag that determines whether wavelengths are generated according to the ray file itself or according to the source's Wavelengths tab.

 

 

Syntax

wlsFlag = GetSourcePosImportedUseWavelengthsFromFile( srcNode )

 

 

Parameters

wlsFlag (Boolean)

Boolean indicating how ray wavelengths are generated in the source.  If True, ray wavelengths will be generated according to the ray file.  If False, ray wavelengths will be generated according to the source's Wavelengths tab.

 

srcNode As Long

Node number of the source having ray positions type "Read rays from a file and generate dynamically" whose wavelength generation flag is being retrieved.

 

 

Example

The following example retrieves the source's wavelength generation flag and prints the value to the output window.

 

Sub Main

 

    Dim srcNode As Long

    srcNode = FindFullName( "Optical Sources.Source 1" )

 

    Dim wlFlag As Boolean

    wlFlag = GetSourcePosImportedUseWavelengthsFromFile( srcNode )

    Print "Source wavelength generation flag: " & wlFlag

 

End Sub

 

 

See Also

Source Scripting Commands

Read Rays From a File and Generate Dynamically

 

 

 

 

 

Copyright © Photon Engineering, LLC