Navigation: Scripting Reference Manual > Functions & Subroutines > IsRayHistory

 

IsRayHistory

 

Contact Us: fredsupport@photonengr.com

 

Description

This command returns a True or False indicating whether or not ray history information is available.

 

 

Syntax

histFlag = IsRayHistory()

 

 

Parameters

histFlag (Boolean)

Returned boolean flag indicating whether ray history information is available (True) or unavailable (False).

 

 

Example

The following example sets up an advanced raytrace to keep track of ray history information, checks to verify that the history exists and then writes the history data to a text file.

 

Sub Main

 

    Dim adv As T_ADVANCEDRAYTRACE

    InitAdvancedRaytrace adv

        adv.draw = True

        adv.rayHistory = True

        adv.rayPaths = True

 

    PathDeleteAll()

    DeleteRays()

 

    Dim numRays As Long

    numRays = AdvancedRaytrace( adv )

 

    Dim histFile As String, success As Boolean

    histFile = GetDocDir() & "\currentRayHistory.txt"

    If IsRayHistory() Then

        success = SaveRayHistory( histFile )

        If success Then

            Print "Ray history file saved."

        Else

            Print "Error saving ray history file."

        End If

    End If

 

End Sub

 

 

See Also

Basic Ray Data Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC