FindObjects
new to Analytica 4.7
= FindObjects( regExp, attribute, excludeAttribute, class, excludeClass, value, influences, influencedBy, inclusive, within, withinAny, contains, containsAny, hasInput, hasOutput, hasParent, hasKid, isLiteral, uses, usedBy, caseSensitive )
Finds Analytica objects matching the criteria specified and returns a set of handles to these objects. The result is a set (a reference to a list), which can be used directly in functions like SetUnion, SetDifference and SetIntersection to combine search criteria in arbitrary ways. To get the result as a list, preface with a de-reference operator, i.e.,
#FindObjects( "Cost" )
A rich set of parameters, all optional, allow many types of criteria to be specified. You can combine criteria by specifying multiple attributes. When multiple types of criteria are present, they are combined conjunctively (i.e., they must all be true).
Parameters
All parameters, with the possible exception of «regExp» and «attribute», must be specified using a named calling convention. All parameters are optional, but at least one parameter should be specified.
«regExp»
A regular expression (text) to search for. Objects having this pattern in any textual attribute, or in any of the attributes listed in «attribute» are returned.
«attribute»
One or more attributes to be matched against «regExp» and «value». When omitted, all applicable attributes are searched. No information about which attribute matched is included in the result.
«excludeAttribute»
One or more attributes to be excluded from the match.
«class»
One or more object classes. Only objects having one of the specified classes are returned. When not specified, only user objects are returned (not built-in objects like SysFunction or SysVar). If you specify Any, then all object classes, user and built-in, are included.
«excludeClass»
One of more object classes to exclude.
«value»
An atomic value to find. Previously computed values are search, or the attributes listed in «attribute». Searches within the individual cells of tables and arrays. You can search for NaN or Null.
«influences»
A list of handles to, or names of variables. Finds all objects that influence all of the listed variables, i.e., all objects upstream from all the listed variables.
«influencedBy»
A list of handles to, or names of variables. Finds all objects downstream from all variables listed.
«inclusive»
Boolean. By default FindObjects(influences:x)
does not include x
itself. When «inclusive» is true, then x
is included. The same goes for «influencedBy», «within», «withinAny», «contains» and «containsAny».
«within»
When one or more modules is specified, only objects within the indicated modules are searched.
«withinAny»
Same as «within», except that it also includes objects that are inside the specified module(s) only as a result of a module alias being inside the module.
«contains»
Searches among modules that contain all of the objects specified in «contains».
«containsAny»
Same as «contains», except that it also includes modules that contain an alias that contains the indicates object(s).
«hasInput»
When true, returns objects that have an input node. When false, objects that have no input node.
«hasOutput»
When true, returns objects that have an output node. When false, objects that have no output node.
«hasParent»
When true, returns objects that depend on at least one other variable. When false, returns objects that have no dependency parents.
«hasKid»
When true, returns objects influence at least one other variable. When false, returns objects with no dependents.
«isLiteral»
When true, returns objects that contain only literals (explicit numbers, text, etc.) or are defined as a table with only literals in the cells.
«uses»
Find objects that use the items listed in «uses». Specify handles to, or textual names of variables, functions or attributes to «uses».
«usedBy»
Finds objects that are used by the items listed in «usedBy». You should specify handles to, or textual names of variables, functions or attributes to «uses».
«caseSensitive»
Controls whether «regExp» is case-sensitive. By default, it is case-insensitive.
Enable comment auto-refresher
Marksmith