User Manual

GETTING STARTED


OTHER EDITIONS


LAUNCHERS


MODULES


PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support

ALL USER MANUAL VERSIONS

Ignition 8.1. Offline Version (04/2021)
Ignition 8 Online Version
Ignition 7.9 Online Version
Ignition 7.8 Online Version

Deprecated Pages

SDK Documentation

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

Exports Tags to a file on a local file system.

The term "local file system" refers to the scope in which the script was running; for example, running this script in a Gateway Timer script will export the file to the Gateway file system.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

Note: This function accepts keyword arguments.
system.tag. exportTags([filePath], tagPaths, [recursive], [exportType] )

  • Parameters

String  or Nothing filePath  - The file path that the Tags will be exported to. If the file does not already exist, this function will attempt to create it.

This feature was changed in Ignition version 8.1.8:
Previously, the filePath parameter was required. If omitted, causes the function to return the tag export as a string. 


List
 tagPaths - A List of Tag paths to export. All Tag paths in the list must be from the same parent folder.

Boolean recursive - Set to true to export all Tags under each Tag path, including Tags in child folders. Defaults to true. [optional]

String exportType - The type of file that will be exported. Set to "json" or "xml". Defaults to "json".     

  • Returns

Nothing

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet
# This example attempts to export the entire Tag Provider, including UDT definitions. 

# The filepath is Operating System dependent, so the path notation below may differ based on where the function is called from.
filePath = 'C:\\Users\\myUser\\Desktop\\myTags'			
tagPaths = ["[default]"]
recursive = True

system.tag.exportTags(filePath, tagPaths, recursive)
# Exports the entire tag provider named "default" as a string, and 
# returns the string to a "tags" variable. 
tags = system.tag.exportTags(tagPaths = ["[default]"])
Keywords

system tag exportTags, tag.exportTags