Description This function retrieves the number of options for wavelength specification (Single, List, Spectrum, etc.) supported by the Source Primitive.
Syntax nOpt = SourcePrimGetWavelSpectCount( spNode )
Parameters nOpt (Long) Returned number of supported wavelength generation options.
spNode As Long Node number of the Source Primitive being queried.
Example The example below demonstrates how to retrieve the number of supported wavelength options for a Source Primitive and then loop over each option and print its corresponding meaning.
Sub Main
'Source primitive being queried Dim spNode As Long spNode = FindFullName( "Optical Sources.Point Source (coherent) 1" )
'Retrieve number of supported wavelength options Dim optCount As Long optCount = SourcePrimGetWavelSpectCount( spNode )
'Iterate over options and print their type Dim curOpt As Long, curType As String
Print "Supported wavelength options: Print "Option" & Chr(9) & "Type" For curOpt = 0 To optCount-1
curType = SourcePrimGetWavelSpectType( spNode, curOpt ) Print curOpt; Print curType
Next
End Sub
See Also Source Primitive Script Commands
|