Difference between revisions of "Sys FoundSet"
(Created page with "category:System Variables category:Analytica 5.0 ''New to Analytica 5.0'' == SysVar Sys_FoundSet == Sys_FoundSet is an Analytica system variable that is pop...") |
m |
||
Line 3: | Line 3: | ||
''New to [[Analytica 5.0]]'' | ''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 == | == SysVar Sys_FoundSet == | ||
− | [[Sys_FoundSet]] is an Analytica system variable that | + | [[Sys_FoundSet]] is an Analytica system variable that contains the results of the last search using [[Find dialog]] as a list of [[handle]]s 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 |
+ | [[image:Magnifying glass.png]]: | ||
: [[image:FoundSetOnDiagram.png]] | : [[image:FoundSetOnDiagram.png]] | ||
Line 14: | Line 16: | ||
</div> | </div> | ||
− | + | You can can toggle whether to mark Found objects with the [[image:Magnifying glass.png]] icon in the [[Find dialog]] with '''Show matches with [[image: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 == | == 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 [[image: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, | + | 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 <code>Inventory</code>. This code in a button's [[OnClick]] attribute shows all objects that influence <code>Inventory</code> and are influenced by it, and so are in the same dynamic loop: | ||
:<code>Sys_FoundSet := [[FindObjects]]( influences:[[Handle]](Inventory), influencedBy:[[Handle]](Inventory) )</code> | :<code>Sys_FoundSet := [[FindObjects]]( influences:[[Handle]](Inventory), influencedBy:[[Handle]](Inventory) )</code> | ||
− | + | 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 [[image:Magnifying glass.png]] icons are temporary. | Because the set you assign is computed, virtually any criteria is possible. Of course, the point with using the feature is that the [[image:Magnifying glass.png]] icons are temporary. |
Latest revision as of 00:52, 1 September 2018
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
:
SysVar DepictFoundSetOnUI
You can can toggle whether to mark Found objects with the icon in the Find dialog with Show matches with
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 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 icons are temporary.
Enable comment auto-refresher