Navigation: Scripting Reference Manual > Functions & Subroutines > SetAcceptanceFilterActiveFlag

 

SetAcceptanceFilterActiveFlag

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine sets the Active flag state for the Acceptance Filter settings of a designated source node. When set to True, any active acceptance filter regions will be applied during ray creation. When set to False, source acceptance filters will be ignored during ray creation.  The active flag for the individual acceptance filters is set on the T_ACCEPTANCE_FILTER data structure.

 

Syntax

SetAcceptanceFilterActiveFlag( srcNode, bState )

 

Parameters

srcNode As Long

Node number of the source whose acceptance filter active flag is being modified.

 

bState As Boolean

Acceptance filter active flag state being applied to the source node.

 

Example

The example below shows how to retrieve the node number of a source, set the source’s Acceptance Filter flag state and then update the FRED model.

 

Sub Main

 

    'Source we want to operate on

    Dim srcNode As Long

    srcNode = FindFullName( "Optical Sources.Source 1" )

 

    'Set the acceptance filter flag state to true or false

    Dim bState As Boolean

    bState = False

    SetAcceptanceFilterActiveFlag( srcNode, bState )

 

    'Update the model

    Update

 

End Sub

 

See Also

Sources Acceptance Filter Script Commands

 

 

 

 

 

 

Copyright © Photon Engineering, LLC