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.

Sorry for the thread revival, but after a search this is the closest match I've found so far.

I'm trying to debug a script. Vision 8.1.35, but was upgraded from 7.9.

I want to call a project script from the script console to test.

image

image

Can I not see the wood for the trees here, it has been a long week...

Have you tried:

project.ISEM_PG6.runReportAllSites(...)

Upgrades from v7.x put global scripts under the shared. package, and project scripts under the project. package.

1 Like

yes, it was at that originally, but then saw this thread and removed it. Let me try it back in because I think I might have had a case sensitivity issue too.

Thanks, a step further, it's now failing at line 132 in ISEM_PG6, but at least it's calling it and telling me where.

Have a good weekend!