Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

New_in
Version7.9.2

 

Panel
titleDescription

Browses a folder path and returns Tag configuration information for each Tag in the folder. This can be used to view event scripts, alarms, as well as any other configurable attribute on a Tag. 

Panel
titleSyntax

 system.tag.browseConfiguration(path, recursive)

  • Parameters 

String path - The path that will be browsed. The path typically leads to a folder. Leave blank to browse the root folder. A tag provider Tag Provider may be specified as follows: "[TagProvider]". If the tag provider Tag Provider is omitted, client scoped calls will be made against the project's default provider. Gateway scoped calls must include a tag providerTag Provider.

Boolean recursive - If true, will recursively search for tags Tags in folders. Each folder will return a 'tags' property containing the nested TagConfigurations in another list. 

  • Returns

 TagConfiguration[] - A list of TagConfiguration objects. Attributes on the object may be read by calling get("propertyName"). 

  • Scope

All

Warning

If called in the gateway scope, a tag provider must be specified.

Info
titleAdd this stuff above

 Results of getProperties()

eventScripts, path, name, value (more potentially. List increases if "non-default" values exist on a property. Path, name, and value seem to always be present.

Panel
titleCode Examples
Code Block
languagepy
titleCode Snippet
#Browse for all tags at the root of the tag provider named 'default'
#Does some other cool stuff. Play with it more. 
configs = system.tag.browseConfiguration("[default]", False)
for item in configs:
	if str(item.tagType) == "Folder":
		for tag in item.subTags:
			print "Name: " + tag.name + ", Type: " + str(tag.tagType)
	else:
		print "Name: " + item.name + ", Type: " + str(item.tagType)