Get Remote Tag Provider Info via Script

Any Change to get Remote Gateway Information via script

From Image I would like to get both Gateway and Provider
image

I’m afraid that I have to query internaldb

I think you’re right.

I haven’t done something like that yet. Any example you can provide please!
The correct classes to use maybe :expressionless:

Cant import com.inductiveautomation.gateway.tags. I think that is the module I need, right?

com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
  File "<function:runAction>", line 4, in runAction
ImportError: No module named gateway

	caused by org.python.core.PyException
Traceback (most recent call last):
  File "<function:runAction>", line 4, in runAction
ImportError: No module named gateway

This may help

1 Like

This is looking better, almost there.
After that, how do you collect results from session?

Not sure sorry, no personal experience. Pinging @nminchin

session.rawQueryMaps will return a dataset

2 Likes

Ohh True, I did not notice it.
Do you know how to import Subclasses?

Do you mean like:

from library.thing import sub-thing

?

Can you import this one? :open_mouth:
RemoteHistorianSettingsRecord (inductiveautomation.com)

Should be able to use:

from com.inductiveautomation.gateway.tags.history.distributed.client import RemoteHistorianSettingsRecord

You’ll need to know how to actually use it though… which is the hard/impossible part without IA’s proper documentation / help from IA guys/gals

That’s the thing. Some classes are not importable because a lack of module name.
But those non importable are subclasses of importable classes.
Take a look to the one I sent, its super is com…PersistentRecord, which is importable.

Yeah, I still fumble my way around the javadocs with a fairly low hit-rate until I get help from the forum from the IA guys. It feels more like stabbing in the dark in space trying to hit pluto, until you get help

1 Like
com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
  File "<function:runAction>", line 3, in runAction
ImportError: No module named gateway

	caused by org.python.core.PyException
Traceback (most recent call last):
  File "<function:runAction>", line 3, in runAction
ImportError: No module named gateway

Like that haha

haha agree. Ok I’ll take the one from the other post. Thanks

just FYI, you can only get the gateway context (IgnitionGateway) from the gateway scope (so you can’t run this in a Vision client)

Oh yeah, already knew that. Thanks

Also note that not all gateway classes are exposed to scripting at all. Specifically, classes supplied by modules instead of the platform. Module classes are only accessible via deliberate scripting support from the module, or rather intricate reflection techniques.

1 Like