system.tag.rename
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​
Type | Parameter | Description |
---|---|---|
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. Defaults to Abort. [optional]. Possible values include:
|
Returns​
QualityCode - A QualityCode object that contains the results of the rename operation.
Scope​
Gateway, Vision Client, Perspective Session
Code Examples​
Example #1 - 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)