# \[bug-16241\]Ignition 8 - system.tag.importTags to create vision client tags?

**URL:** <https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405>\
**Category:** Ignition Early Access\
**Tags:** ignition80\
**Created:** [March 25, 2020, 4:57pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405 "2020-03-25T16:57:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 25, 2020, 4:57pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/1 "2020-03-25T16:57:43Z")

</div>

Can we use this function **system.tag.importTags** to create **vision client tags**?

```auto
collisionPolicy = "a"
filePath = "d:/test.xml"
basePath = "[client]"
system.tag.importTags(filePath, basePath, collisionPolicy)

```

return java.lang.NullPointerException (Ignition 8.0.10)

Is there any way to create a cision client tag by scripting in Ignition 8 ?

**system.tag.configure** only support gateway tags but not vision clients tag ?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2020, 5:03pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/2 "2020-03-25T17:03:14Z")

</div>

The 7.9 function [`system.tag.loadFromFile`](https://docs.inductiveautomation.com/display/DOC79/system.tag.loadFromFile) should still work in 8.0; it’s just deprecated and thus removed from the 8.0 manual. Client tags still use the legacy tag code, so I wouldn’t expect the new functions to work with them.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 25, 2020, 5:10pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/3 "2020-03-25T17:10:41Z")

</div>

**system.tag.loadFromFile** seems not supporting client tag ?  
with provider = client, no client tags are created ???

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2020, 5:19pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/4 "2020-03-25T17:19:11Z")

</div>

Can you send me your client tag XML? I can breakpoint the function and see where it’s going wrong.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 25, 2020, 5:20pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/5 "2020-03-25T17:20:49Z")

</div>

A simple file exported from v8.0.10

```auto
<Tags>
   <Tag name="essai" path="" type="Client">
      <Property name="Value">false</Property>
      <Property name="DataType">6</Property>
      <Property name="PollRate" mode="2">0</Property>
   </Tag>
</Tags>

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2020, 5:35pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/6 "2020-03-25T17:35:19Z")

</div>

Well, it’s not working because it’s not implemented. Whoops. I’ll file a ticket.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 7, 2020, 6:46am UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/7 "2020-04-07T06:46:05Z")

</div>

It will be usefull to implement the **exportTags** function for **vision client tag**!  
We especially need it to automate by scripting, client tags exports to xml file or json in order to commit this file in git with the project.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 8, 2020, 7:48pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/8 "2020-04-08T19:48:12Z")

</div>

@paul-griffith

in **8.0.10** , do you think it’s possible to use in client scope (in a module) the following 7.9 flavour class in order to export client tags of a project to xml file ?

com.inductiveautomation.ignition.common.sqltags.importexport.ClientTagExporter::  
exportTags​(java.util.List nodes, java.io.Writer writer, ProgressListener progress, TagPath base)

[http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.10/com/inductiveautomation/ignition/common/sqltags/importexport/ClientTagExporter.html](http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.10/com/inductiveautomation/ignition/common/sqltags/importexport/ClientTagExporter.html)

If yes, what are the parameter to export all the tag of [client] ?  
is nodes mandatory ?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 8, 2020, 10:16pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/9 "2020-04-08T22:16:53Z")

</div>

Yes, it is possible; it’s the same class that’s used internally. For nodes, just make a base `TagPath` of `[client]`, then get the `ClientTagProvider` and call `getTag`; something like:

```auto
                ClientTagProvider clientProvider = context.getTagManager().getClientTagProvider("client");
                if (clientProvider instanceof SubManagerAdapter) {
                    ClientSubManager client = ((SubManagerAdapter) clientProvider).getTarget();
                    BasicTagPath path = new BasicTagPath("client");
                    List<Tag> clientTag = List.of(clientProvider.getTag(path))
                    new ClientTagExporter().exportTags(clientTags, fw, null, null);

```

---

<div class="post-metadata">

**Author:** ![imt.sebastian.sanche](https://avatars.discourse-cdn.com/v4/letter/i/ecb155/32.png) [@imt.sebastian.sanche](https://forum.inductiveautomation.com/u/imt.sebastian.sanche)\
**Post date:** [June 13, 2024, 10:31pm UTC](https://forum.inductiveautomation.com/t/bug-16241-ignition-8-system-tag-importtags-to-create-vision-client-tags/33405/10 "2024-06-13T22:31:25Z")

</div>

Is this still the best way to import client tags or will the `system.tag.importTags` also if the idea is to import automatically the same set of client tags to different providers how can this be done?

I'm using this script to import UDTs and I'm wondering if it would work the same for client tags.

```python
###################To Modify###################
lineName = ''
filePath = 'fiePath'
###############################################

tags = system.tag.browse(filter={'tagType':'Provider'}).results
providersList = []
for result in tags:
	providers=str(result['fullPath'])
	x = providers.find(lineName)
	if x != -1:
		providersList.append(providers)

for result in providersList:
	print result
	system.tag.importTags(filePath, result, 'i')

```

Is the `system.tag.loadFromFile` still working on 8.1? I wanted to test on a project but got an error on the script console.

```python
# Create variables to pass into the function
filePath = 'C:\Users\Documents\Ignition\Tags\clientAlarmcfg.xml'
provider = 'client' 
# Load the file
system.tag.loadFromFile(filePath,provider,0)

```

XML:

```python
<?xml version="1.0"?>
-<Tags>

-<Tag type="Client" path="AlarmConfiguration" name="JournalName">
<Property name="Value">BP2</Property>
<Property name="DataType">7</Property>
<Property name="PollRate" mode="2">0</Property>
</Tag>

-<Tag type="Client" path="AlarmConfiguration" name="ProviderFilter">
<Property name="Value">.</Property>
<Property name="DataType">7</Property>
<Property name="PollRate" mode="2">0</Property>
</Tag>

-<Tag type="Client" path="AlarmConfiguration" name="SourceFilter">
<Property name="Value"/>
<Property name="DataType">7</Property>
<Property name="PollRate" mode="2">0</Property>
</Tag>

</Tags>

```
