Ignition 8 Tag Event Script

I created two projects,
Automation is the real one,
Automation_script has only scripts to share:

On Automation_scrip I imported the old scripts


On Automation they complete correctly


if I use a button to call up the function everything goes correctly

If I insert the same function in the Tag > Tag Event Script

Now what I don’t understand,
NameError: global name ‘shared’ is not defined

There were some bugs around this in the 8.0.0 release - can you try 8.0.1-rc1?

Ignition v8 has a whole different architecture for shared scripts. If you restore a complete gateway backup, it’ll create a parent project to replace the shared environment, but if you import project by project, you have to shuffle the structure yourself. ‘shared’ won’t exist, as you’ve experienced.

Sorry, didn’t look close at your inheritance diagram… /-:

Absolutely try upgrading to 8.0.1-rc1, but to clarify, is the Automation_script project configured as the Gateway Scripting Project?

Gateway > Config > Gateway Settings > Gateway Scripting Project (at the bottom of the page).

1 Like

y use the release 8.0.1-rc1

this is the Gateway Scripting Project

According to your other screenshots you should have the value “Automation_script” for that setting, not “globals”.

Right, you do not have a project named globals, so we need to update the scripting project for your gateway.

Navigate back to the Gateway Scripting Project property in my earlier post, and set it to Automazione_script, and Save Changes.

Ok, perfect.

1 Like

hey Paul. thanks for this post. I was struggling to get tag event scripts working with libraries, and didn’t know about this new Gateway setting.

This page in the 8.0 documentation really needs updating.
I understand there’s lots do in documentation, but IMO, this is high priority since previous behavior changed and the information here is incorrect.

Also, this page should define how library routines can be accessed by the tag event script.

My friend, that is an understatement. :sweat_smile:

Joking aside, I agree. This Gateway Scripting Project concept was a major change that seems to have gotten lost in the shuffle. We apologize for the headaches that the outdated page caused.

I went rogue and created a quick replacement page: https://docs.inductiveautomation.com/display/DOC80/Project+Library

Additionally, I added a small heading and link on the Tag Event Scripts page linking back to the relevant information on the Project Library page, as you suggested. I’d like to spend a bit more time on the Project Library page and add some additional content (adding extra examples and such), but hopefully the changes on the page now should prevent folks from running into the same troubles.


Perfect! I took a look at the new page, and I think it looks great.

Nicely done! Once again the IA team exceeding expectations.

1 Like

Can we use a list of projects or only 1?

It’s just 1.

1 Like

solve it thanks