Navigation: Scripting Reference Manual > Functions & Subroutines > SourcePrimGetParmPtSrcCohSingle

 

SourcePrimGetParmPtSrcCohSingle

 

Contact Us: fredsupport@photonengr.com

 

Description

This function retrieves the configuration parameters for a Point Source (coherent) type Source Primitive that uses the Single wavelength option.  If the source uses the List wavelengths option, then SourcePrimGetParmPtSrcCohList must be used.

 

 

Syntax

success = SourcePrimGetParmPtSrcCohSingle( spNode, tPtSrc, wl )

 

 

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.

 

wl As Double

Retrieved source wavelength in units of microns.

 

 

Example

The example below demonstrates how to retrieve the configuration parameters from a Point Source (coherent) type Source Primitive using the Single wavelength 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 wl As Double

    Dim tPtSrc As T_SOURCEPRIMPTSRCCOH

    success = SourcePrimGetParmPtSrcCohSingle( spNode, tPtSrc, wl )

 

    'Print configuration to output window

    If success Then

        Print ""

        Print "Configuration for source " & GetName( spNode )

        Print "Wavelength" & Chr(9) & wl

        Print "Number of samples" & Chr(9) & tPtSrc.num

        Print "Emission semi-angle" & Chr(9) & tPtSrc.phi

        Print "Power (Watts)" & Chr(9) & tPtSrc.PowerWatts

    Else

        Print "Configuration parameters not retrieved from source node."

    End If

 

End Sub

 

 

See Also

Source Primitive Script Commands

Point Source (coherent)

SourcePrimGetParmPtSrcCohList

SourcePrimSetParmPtSrcCohList

SourcePrimSetParmPtSrcCohSingle

T_SOURCEPRIMPTSRCCOH

 

 

 

 

 

Copyright © Photon Engineering, LLC