Sys FoundSet


New to Analytica 5.0 Sys_FoundSet is a system variable that contains a list of the objects found by the last search using the Find dialog.

SysVar Sys_FoundSet

Sys_FoundSet is an Analytica system variable that contains the results of the last search using Find dialog as a list of handles to the objects matching your search criteria. You can see these objects in the Found Objects module in the Outline window. This list appears if you click the List button in the Find dialog. In a Diagram window, the node for each object in Sys_FoundSet is marked with a Magnifying glass.png:

FoundSetOnDiagram.png

SysVar DepictFoundSetOnUI

You can can toggle whether to mark Found objects with the Magnifying glass.png icon in the Find dialog with Show matches with Magnifying glass.png checkbox. You can also toggle it in an OnClick or Onchange script by assigning true (1) to system variable DepictFoundSetOnUI.

Assigning to Sys_FoundSet

You can also assign a list of handles to Sys_FoundSet in an OnClick or Onchange script to mark those nodes with the Magnifying glass.png icon. For example, if you want to write a function to identify the variables in a dynamic loop or objects which are missing a Description attribute. Often you might use the built-in FindObjects function, which provides considerably more power and flexibility that the Find dialog.

For example, this could help you debug a dynamic loop by showing all the variables in the same loop as a variable of interest, say Inventory. This code in a button's OnClick attribute shows all objects that influence Inventory and are influenced by it, and so are in the same dynamic loop:

Sys_FoundSet := FindObjects( influences:Handle(Inventory), influencedBy:Handle(Inventory) )

This can be especially helpful with a complex dynamic loop that spans variables in several different diagrams.

Because the set you assign is computed, virtually any criteria is possible. Of course, the point with using the feature is that the Magnifying glass.png icons are temporary.

See Also

Comments


You are not allowed to post comments.