Project Library scripts

Maybe this a perspective thing, but I’m trying to call a project script from the script console (also tried a button in a view) and get the error below.

my function call:
project.test.scriptName()

error:

NameError: name ‘project’ is not defined

How do I call a project script?

If you can’t in perspective, where should I put things that will be reused in lots of places?

drop project. its no longer required in Ignition 8.

1 Like

thank you!

1 Like

Now I’m getting the same thing, but from a gateway script. I’ve copied the exact script that was running on a tag, to a gateway timer event. I have the correct project set under gateway settings for scripts.

my gateway script:
client = p1.srmCredentials.getClient()

the error:

... line 2, in getInfo NameError: global name 'project' is not defined

The scripts: image

Ah, well my gateway event script was inside of a function. When I took it out of the function and ran it it found the project scripts.