Skip to main content
Version: 8.1


This function is used in Python Scripting.


Imports a JSON tag file at the provided path. Also supports XML and CSV Tag file exports from legacy systems.

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.


system.tag.importTags(filePath, basePath, [collisionPolicy])


StringfilePathThe file path of the tag export to import.
StringbasePathThe Tag path that will serve as the root node for the imported tags.
StringcollisionPolicyThe action to take when a tag or folder with the same path and name is encountered. Defaults to Overwrite. [optional]. Possible values include:
  • a - Abort and throw an exception
  • o - Overwrite and replace existing tag's configuration
  • i - Ignore that item in the list.


List - A List of QualityCode objects, one for each tag in the list, that is representative of the result of the operation. See Scripting Object Reference.


Gateway, Vision Client, Perspective Session

Code Examples

Example #1
# This script will import a .json file containing Sine Tags from the desktop into a folder in the Tag Browser called "Imported Tags".
filePath = "C:/Users/[USERNAME]/Desktop/SineTags.json"
basePath = "[default]Imported Tags"



system tag importTags, tag.importTags