Description This function retrieves the configuration parameters for a Point Source (coherent) type Source Primitive that uses the List wavelength option. If the source uses the Single wavelength option, then SourcePrimGetParmPtSrcCohSingle must be used.
Syntax success = SourcePrimGetParmPtSrcCohList( spNode, tPtSrc, tWls() )
Parameters success (Boolean) Returned boolean indicating whether the parameters were successfully retrieved from the source node.
spNode As Long Node number of the Point Source (coherent) type Source Primitive being queried.
tPtSrc as T_SOURCEPRIMPTSRCCOH Data structure containing the configuration parameters of the Point Source.
tWls() As T_WAVELENGTHSPEC An array of T_WAVELENGTHSPEC data structures that will be populated with the data from the wavelength List after the function executes.
Example The example below demonstrates how to retrieve the configuration parameters from a Point Source (coherent) type Source Primitive using the List wavelength option and then print the parameter values to the output window.
Sub Main
'Source node being queried Dim spNode As Long spNode = FindFullName( "Optical Sources.Point Source (coherent)" )
'Retrieve configuration parameters Dim success As Boolean Dim tWls() As T_WAVELENGTHSPEC Dim tPtSrc As T_SOURCEPRIMPTSRCCOH success = SourcePrimGetParmPtSrcCohList( spNode, tPtSrc, tWls() )
'Print configuration to output window Dim curWl As T_WAVELENGTHSPEC If success Then Print "" Print "Configuration for source " & GetName( spNode ) Print "Number of samples" & Chr(9) & tPtSrc.num Print "Emission semi-angle" & Chr(9) & tPtSrc.phi Print "Power (Watts)" & Chr(9) & tPtSrc.PowerWatts Print "Wavelength (um)" & Chr(9) & "weight" For Each curWl In tWls() Print curWl.wavelen & Chr(9) & curWl.weight Next Else Print "Configuration parameters not retrieved from source node." End If
End Sub
See Also Source Primitive Script Commands SourcePrimGetParmPtSrcCohSingle SourcePrimSetParmPtSrcCohSingle
|