# system.tag.addTag not working

**URL:** <https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235>\
**Category:** Ignition\
**Created:** [December 5, 2018, 4:20pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235 "2018-12-05T16:20:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick.garceau](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@patrick.garceau](https://forum.inductiveautomation.com/u/patrick.garceau)\
**Post date:** [December 5, 2018, 4:20pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/1 "2018-12-05T16:20:03Z")

</div>

Any idea why I get this error: com.inductiveautomation.ignition.designer.gui.tool’ object has no attribute ‘addTag’

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 5, 2018, 4:34pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/2 "2018-12-05T16:34:00Z")

</div>

Can you post the code you’re trying to run?

---

<div class="post-metadata">

**Author:** ![patrick.garceau](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@patrick.garceau](https://forum.inductiveautomation.com/u/patrick.garceau)\
**Post date:** [December 5, 2018, 4:45pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/3 "2018-12-05T16:45:53Z")

</div>

Everything is commented out as it is not working.  
I will also upgrade my software from 7.9.6 to 7.9.10

```auto
#dName = "IS1.CB1"

#system.tag.addTag(parentPath='', name="IS1", tagType="Folder")

###
###system.tag.addTag( parentPath="",
### name= dName + ".TagOPC",
### tagType="OPC",
### dataType="Int2",
### attributes={"OPCServer":"Ignition OPC-UA Server",
### "OPCItemPath": dName + "HR1"})

```

---

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [December 5, 2018, 4:59pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/4 "2018-12-05T16:59:29Z")

</div>

Where are you calling this from? Try specifying tag provider?

---

<div class="post-metadata">

**Author:** ![patrick.garceau](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@patrick.garceau](https://forum.inductiveautomation.com/u/patrick.garceau)\
**Post date:** [December 5, 2018, 5:33pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/5 "2018-12-05T17:33:42Z")

</div>

From the project script, also tried the script console.  
Both not working, addTag is not an attribute of system.tag

---

<div class="post-metadata">

**Author:** ![patrick.garceau](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@patrick.garceau](https://forum.inductiveautomation.com/u/patrick.garceau)\
**Post date:** [December 5, 2018, 6:26pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/6 "2018-12-05T18:26:03Z")

</div>

What is the tag provider?

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [December 5, 2018, 9:20pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/7 "2018-12-05T21:20:03Z")

</div>

Try this and see if it works for you. If you arent using the default tag provider you will need to put your tag provider name in the brackets by folderpath

```auto
dName = 'testdevice'
folderpath = '[default]' + dName + '/'	
scaledLow = '100'
scaledHigh = '100'
scaleMode = 0
tagname = 'IS1'
doc = 'doc'
opcserver = 'Ignition OPC-UA Server'
opcitempath = 'HR1'
system.tag.addTag(parentPath=folderpath, name=tagname, tagType="OPC", dataType="Int2", attributes={"OPCServer":"%s" % opcserver, "OPCItemPath":"%s" % opcitempath,"Documentation":"%s" % doc,})

```

---

<div class="post-metadata">

**Author:** ![patrick.garceau](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@patrick.garceau](https://forum.inductiveautomation.com/u/patrick.garceau)\
**Post date:** [December 6, 2018, 6:49pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/8 "2018-12-06T18:49:41Z")

</div>

> [@diat150](#):
>
> dName = 'testdevice'  
> folderpath = '[default]' + dName + '/'   
> scaledLow = '100'  
> scaledHigh = '100'  
> scaleMode = 0  
> tagname = 'IS1'  
> doc = 'doc'  
> opcserver = 'Ignition OPC-UA Server'  
> opcitempath = 'HR1'  
> system.tag.addTag(parentPath=folderpath, name=tagname, tagType="OPC", dataType="Int2", attributes={"OPCServer":"%s" % opcserver, "OPCItemPath":"%s" % opcitempath,"Documentation":"%s" % doc,})

Traceback (most recent call last):  
File "", line 10, in   
AttributeError: 'com.inductiveautomation.ignition.designer.gui.tool' object has no attribute 'addTag'

Same error.

---

<div class="post-metadata">

**Author:** ![patrick.garceau](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@patrick.garceau](https://forum.inductiveautomation.com/u/patrick.garceau)\
**Post date:** [December 6, 2018, 8:54pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/9 "2018-12-06T20:54:55Z")

</div>

Called support.

It seems that the function addTag is only available if the Vision Module is installed.  
Not documented of course.

Should work on the Gateway, no where else without the Vision Module.

Good to know.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 6, 2018, 8:58pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-not-working/21235/10 "2018-12-06T20:58:58Z")

</div>

Yeah, there’s a handful of functions that only work in the designer if you have the Vision module installed, but they work like normal in the gateway either way.

It’s a bit of an oversight that the functions are missing from the designer scope when Vision isn’t installed but it only effects your ability to run them in the script playground.
