I'm using Ignition 8.1 and I want to run a script from Project Library in a Gateway Event, inside a system.tag.readAsync callback. I've noticed that I can't directly use libraries inside the callback and need to import them first, like with the System library.
In the example below, I get a NameError: Api. How do I import Api, which is a script/folder inside the Project Library? (import Api doesn't work)
def processTagReads(qvAsyncResults):
import system
saved = Api.saveOrderConsumption(qvAsyncResults[2].value, qvAsyncResults[3].value)
system.tag.writeBlocking("[default]AGROMATIC/bal 0/saved", saved)
system.tag.readAsync(tagPaths, processTagReads)