Browsing available OPC servers based on a tag provider selection

I was trying to get a list of opc servers based on a tag provider. In the latest ignition designer this can be achieved when you select a tag provider from the drop down tag browser the opc browser updates with the relevant opc servers based on the tag provider selection with respect to which gateways the tag provider was created on.
In my case I have multiple remote gateways connected to my main server.

The available system.opc functions only let you browse the opc servers on currently opened runtime.

Im curious how the opc browser is able to get updated based on the tag browser selection. I'm trying to get the opc servers available based on a user selected tag provider, so I can use those opc servers to build data in the perspective tree component?

Hi alex.narvais,

I am not sure if I understand your question/post. Could you clarify some more?

If you are just looking to see the list of opc connections under Tag Browser, you can select System tags > Gateway > OPC folder > Connections folder.

This was solved awhile back, a few days after I posted this question and with that said I was able to achieve this by setting up Gateway Message Handlers between my main server and each of my tag servers

Each Tag Server has the following
get_opc_servers message handler:

def handleMessage(payload):
	return system.opc.getServers()

On my main server I just call the following system function to populate a Perspective Tree Component to view the results.

results = system.util.sendRequest(project=proj_serv[0], messageHandler=message_handler, payload={"opc_server": opc_server, "node_id": node_id}, remoteServer=proj_serv[1])