Description This function queries a source node for the number of Acceptance Filter regions defined.
Syntax nFilters = GetSrcAcceptanceRegionCount( srcNode )
Parameters nFilters (Long) Returned count of Acceptance Filter regions defined in the source node being queried.
srcNode As Long Node number of the source being queried.
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
|