Description This subroutine updates the parameters of an existing Acceptance Filter region of a source.
Syntax SetSrcNthAcceptanceRegion( srcNode, nFilter, tFilter )
Parameters srcNode As Long Node number of the source whose N’th Acceptance Filter region is being modified.
nFilter As long The index (0-based) of the Acceptance Filter region being modified.
tFilter As T_ACCEPTANCE_FILTER This parameter contains the data structure that defines the Acceptance Filter region settings that will be applied to the N’th Acceptance Filter region of the source node.
Example The example below demonstrates how to count the number of Acceptance Filter regions of a given source and then loop over each region to retrieve the filter settings, set the filter active flag to True and then set the updated specification back to the filter. Sub Main
'Source we want to modify Dim srcNode As Long srcNode = FindFullName( "Optical Sources.Source 1" )
'Retrieve the count of acceptance filters Dim nFilters As Long nFilters = GetSrcAcceptanceRegionCount( srcNode )
'Loop over the acceptance filters and activate them Dim tFilt As T_ACCEPTANCE_FILTER Dim curFilt As Long For curFilt = 0 To nFilters-1 GetSrcNthAcceptanceRegion( srcNode, curFilt, tFilt ) tFilt.isActive = True SetSrcNthAcceptanceRegion( srcNode, curFilt, tFilt ) Next
'Update the model Update
End Sub
See Also Sources Acceptance Filter Script Commands
|