WatchTags

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

Description:

Watches for tag changes, either external or local
Returns: Boolean
Usage: Steady State only.
Function Groups: Variable
Related to:
Format: \WatchTags([Context, TypeOrGroup]);
Parameters:  

Context
Optional. An instance of a container tag object. If provided, WatchTags will trigger if the Context or any of its descendents are refreshed, and will ignore changes to any other parts of the tag hierarchy.
If not provided, WatchTags triggers on any tag change.
TypeOrGroup
Optional. At present, only the group name "Container" is supported. If provided, WatchTags will trigger only when a tag in the matching group is changed. Type names are not supported.

Comments: WatchTags() will trigger immediately, much like a Watch(1).

Examples

If WatchTags(); { Will trigger when any tag in the application is added/modified/deleted. 
                  Will also trigger initially. }
[
  TagList = GetTagList(); 
]

If WatchTags(Site1Obj); { Will trigger whenever Site1 or its descendents are changed }

If WatchTags(EastObj, "Container"); 
{ Will trigger whenever any container tags (e.g. context tags and station tags) are changed under 
  the East folder }