This function is used in Python Scripting.

Description

Renames a single tag or folder. 

Client Permission Restrictions

Permission Type: Tag Editing

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.

Syntax

 system.tag.rename(tag, newName, [collisionPolicy])

  • Parameters

String tag - A path to the tag or folder to rename. 

String newName - The new name for the tag or folder. 

String collisionPolicy - The action to take when a Tag or folder with the same path and name is encountered. Possible values include: "a" Abort and throw an exception, "o" Overwrite and replace existing Tag's configuration, "i" Ignore that item in the list. Defaults to Abort if not specified. [optional]  

  • Returns

QualityCode - A QualityCode object that contains the results of the rename operation. 

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet - Rename a Folder
old = "[default]folder/tag"
new = "noun_1"		# Note that the new name should not include the full path or tag provider. Just the name suffices. 

system.tag.rename(old, new)
Keywords

system tag rename, tag.rename