# getConfiguration From Gateway Tag and configure New Client Tag

**URL:** <https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747>\
**Category:** Ignition\
**Tags:** scripting, vision, ignition81\
**Created:** [May 22, 2024, 4:54pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747 "2024-05-22T16:54:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [May 22, 2024, 4:54pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/1 "2024-05-22T16:54:49Z")

</div>

I have a set of ("default") tags that exist within a tag provider that I want to make sure also exist in Vision's `[Client]` tag provider. I'm trying to achieve this using the following steps:

1. Browse the "default" tags using `system.tag.browse()` recursively.
2. Substitute `[client]` in the fullPath to get the equivalent vision client tag path.
3. Use `system.tag.exists()` to see if the client tag exists.
4. Use `system.tag.getConfiguration()` to get the default configuration.
5. Use `system.tag.configure()` to set the new client tag's configuration from the default configuration.

I'm just having trouble with the last step.

```python
#get default tags
defaultTags = system.tag.browse('Vision_Client_Defaults', {'recursive':True, 'tagType':'AtomicTag'})

for i, tag in enumerate(defaultTags):
	#default tag path
	defaultPath = str(tag['fullPath'])
	
	#client tag path
	clientPath = '[client]' + defaultPath.split('Vision_Client_Defaults/',1)[1]
	
	#check to see if client tag exists
	if not system.tag.exists(clientPath):
		#get the default tag configuration
		defaultConfig = system.tag.getConfiguration(defaultPath, False)[0]
		
		#get the client tag base path
		clientTagBasePath = clientPath.rsplit('/',1)[0]
	
		#create the client tag
		system.tag.configure(clientTagBasePath, defaultConfig)

```

I get a `Provider not found: client` error. I'm guessing it's a scope issue? (just testing, running from the script console).

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 22, 2024, 5:14pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/2 "2024-05-22T17:14:09Z")

</div>

The Vision Client Tags subsystem didn't get updated to the new tag model for v8.0. So `system.tag.configure()`, which is built to rely on the new system, chokes. Try with the deprecated functions from v7.9.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [May 22, 2024, 5:17pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/3 "2024-05-22T17:17:03Z")

</div>

[system.tag.addTag](https://www.docs.inductiveautomation.com/docs/7.9/appendix/scripting-functions/system-tag/system-tag-addTag)

Can't add client tags?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 22, 2024, 5:21pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/4 "2024-05-22T17:21:19Z")

</div>

Hmm. You may have to directly access the client tag manager from the designer context. (That is, SDK methods. And therefore not possible in a supported way.)

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [May 22, 2024, 5:32pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/5 "2024-05-22T17:32:20Z")

</div>

"Can't do it" just seems like a lazy programmer excuse because I can't think of a logical reason why one specific type of tag couldn't be created via a script, called in the correct scope.

I have not done anything SDK. Where might I look?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 22, 2024, 5:34pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/6 "2024-05-22T17:34:38Z")

</div>

> [@amarks](#):
>
> I can't think of a logical reason

Vision Client tags have always been special. Their definition is per project and their runtime instances have unique values per client. Nothing else in the tag system is like that.

> [@amarks](#):
>
> Where might I look?

> **[ClientTagManagerImpl](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.38/com/inductiveautomation/ignition/client/tags/impl/ClientTagManagerImpl.html)**
>
> declaration: package: com.inductiveautomation.ignition.client.tags.impl, class: ClientTagManagerImpl

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [May 22, 2024, 5:38pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/7 "2024-05-22T17:38:34Z")

</div>

That looks pretty foreign to me 😅

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 22, 2024, 5:46pm UTC](https://forum.inductiveautomation.com/t/getconfiguration-from-gateway-tag-and-configure-new-client-tag/90747/8 "2024-05-22T17:46:14Z")

</div>

If you have my Toolkit installed, then this:

```python
mgr = system.util.toolkitCtx().tagManager

```

will give you the instance of that class in Designer and Vision Client contexts.

You may need to poke around with reflection to discover everything possible, and/or do so with the `ClientTagProvider` itself.

(I can't help that it is cryptic and undocumented, sorry.)
