GetTagList
Description: | Returns an array of tags, starting at a given point in the tag tree and including all child tags below that point, subject to the filtering parameters. |
Returns: | Array |
Usage: | Script Only. |
Function Groups: | Basic Module |
Related to: | PointList | GetTagTypes |
Format: | \GetTagList([RootLevel, DoRecursive, SearchType, SearchString, TagType, AreaSearch, EnableRealmAreaFiltering, IncludeGhosts, ExcludeLeaves, ExcludeMenuItems, ExcludeSubordinateTags, EquipTypeSearch]) |
Parameters: |
RootLevel |
Optional text. The name of the tag to begin with. May be a unique id or a tag name. Defaults to VTSDB if not specified. |
DoRecursive |
Optional. A Boolean value which, when set TRUE, results in sub-tags being returned as well as tags at the current level of the tree. Defaults to false if Invalid. |
SearchType |
Optional flag. Set 0 for a name search or 1 to search all parameters. Defaults to 0, name search. |
SearchString |
Optional text. A value to filter for, using pattern matching. |
TagType |
The type of tag to be filtered for. |
AreaSearch |
Optional text - the area name to filter for using pattern matching. |
EnableRealmAreaFiltering |
Optional Numeric with possible values as follows: 0 => no realm or user filtering. 1 => apply realm & user filtering. (Default) 2 => apply only realm filtering. |
IncludeGhosts |
Optional Boolean. Set TRUE to include disabled tags. Defaults to FALSE. |
ExcludeLeaves |
Optional Boolean. Set TRUE to filter for only tags that have child tags. Defaults to FALSE. |
ExcludeMenuItems |
Optional Boolean. Set to TRUE to exclude Menu ItemTags. Defaults to FALSE |
ExcludeSubordinateTags |
Optional Boolean. Set to TRUE to exclude Subordinate tags and tags from subordinate applications. Defaults to FALSE. |
EquipTypeSearch |
Optional Text. Provide an equipment type name to search for tags with that EquipmentType property. No default. |
Comments: | This function provides the search and filtering features seen in the Tag Browser. You should select this function over the older PointList, since GetTagList adds several options to control what will be returned. |
Examples:
Select all driver tags in application:
If 1; [ PList = \GetTagList(Invalid, TRUE, 0, "*", "Drivers", Invalid, FALSE); ]
Select all the Analog Status tags, in all areas, within a context named MyStationName:
If 1; [ PList = \GetTagList("MyStationName", TRUE, 0, "*", "AnalogStatus"); ]