Navigation: Scripting Reference Manual > Functions & Subroutines > GetDiffractEfficiencyFile

 

GetDiffractEfficiencyFile

 

Contact Us: fredsupport@photonengr.com

 

Description

This command retrieves the full path of the diffraction efficiency file being used for a grating surface whose efficiency table type is "Full efficiency table".  If the surface being queried does not have a diffraction efficiency table of the correct type, the script will halt with an error.  Gratings have a primary and secondary efficiency specification that allows an accounting of which side of the grating a ray is incident from.  This script command retrieves the primary efficiency specification.  For more information, refer to the gratings help topic.

 

 

Syntax

fName = GetDiffractEfficiencyFile( gratNode )

 

 

Parameters

fName (String)

Returned full path name to the file which is being used to populate the efficiency table.

 

gratNode As Long

Node number of the grating surface whose diffraction efficiency file is being queried.

 

 

Example

The following example retrieves the full path name of the diffraction efficiency file being used by a surface and prints the result to the output window.

 

Sub Main

 

    Dim gratNode As Long

    gratNode = FindFullName( "Geometry.Plane-NewGrating.Surface" )

 

    Dim fName As String

    fName = GetDiffractEfficiencyFile( gratNode )

    Print "Efficiency file: " & fName

 

End Sub

 

 

See Also

Diffraction Grating Script Commands

Diffraction Gratings

 

 

 

 

 

Copyright © Photon Engineering, LLC