Navigation: Scripting Reference Manual > Functions & Subroutines > WriteBasicRayDataToFCRFileEx

 

WriteBasicRayDataToFCRFileEx

 

Contact Us: fredsupport@photonengr.com

 

Description

Write all rays to FRED Compact Rayset (FCR) file with options to include ray wavelengths and an analysis node for ray filtering.  Depending on the number of rays traced, it may be necessary to dimension ray index and ray counter variables as data type Huge_ instead of Long.  Please see Multi-threaded Raytracing for more information.

 

Syntax

raycount = WriteBasicRayDataToFCRFileEx( fname, incWls, filtNode )

 

Parameters

raycount (Long or Huge_)

Returned number of rays that were written to file.

 

fname As String

Full path name of the ray file being written to disk.

 

incWls As Boolean

Flag specifying whether ray wavelengths should be included in the ray file.

 

filtNode As Long

Node number of an analysis entity whose ray filters will be applied to the rayset being written to file.

 

 

Example

The following example writes rays to a file, including wavelength data as well as applying the ray filters from an analysis surface.

 

Sub Main

 

    Dim anaNode As Long

    anaNode = FindFullName( "Analysis Surface(s).Analysis 1" )

 

    Dim numRays As Long

    numRays = WriteBasicRayDataToFCRFileEx( "C:\temp\testRays.fcr", True, anaNode )

    Print "Number of rays written to file: " & numRays

 

End Sub

 

 

See Also

WriteBasicRayDataToFCRFile

ReadBasicRayDataFromFile

Ray Import

ReadRaysFromFRBSFileToRayBuffer

WriteRaysFromRayBufferToFRBSFile

ReadSourceUserRays

ReadSourceUserRays2

SetSourcePosImported

 

 

 

 

 

 

Copyright © Photon Engineering, LLC