GetTagList

(VTScada-Layer function. Must be called with a leading backslash.)

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, ParmSearchString, AdditionalFilters, AddrSearchString])
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
Optional. The type of tag to be filtered for. Set to Invalid (not "*") for all tag types.
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.
ParmSearchString
Optional text. Search string for full parameter search
AdditionalFilters

Optional structure. Array of structures of additional filters.

  AdditionalFiltersStruct Struct [
    VariableName { Variable to check                  };
    OperandID    { See table below for definitions          };
    Value        { Value to compare against           };
    IsText       { Flag - Do this comparison as text  };
  ];  
OperandID Meaning
0 Valid
1 True
2 False
3 Less Than
4 Less Than Or Equal
5 Equal
6 Greater Than Or Equal
7 Greater Than
8 Pattern Match

Use this to specify a parameter or variable name, the operand to use for the comparison, and a value to compare against. As an example, the Tag Browser uses this for the filter to show only tags with Questionable set.

AddrSearchString
Optional text. Search string for address search
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");
  ]