Create Pen DataSource programmatically

In our company we have an Ignition Edge connected to an Igntion Central via GetwayNetwork.
Ignition Edge tags are historicized to an Ignition Central history provider.

For a power chart, I need to programmatically create the pens datasource from the tag path.

For example:

  • Tag path: [remtagElBonillo]UP1/Inverters/Inv1/RT/Current/AC

  • Expected Pen Datasource:
    "histprov:elbonillo:/drv:ignition-elbonillo:tagedge:/tag:up1/inverters/inv1/rt/current/ac"

If I try to get the necessary values ​​with readBlocking, I get the parameters that correspond to the remote tag, for example History Provider = "histEdge", but I need History Provider = "elbonillo".

So the solution would be to access the parameters of the Real Time Provider (Edge Remote) programmatically. Is it possible to read these parameters somehow?:

Best Regards.

If you use the script provided in this thread, what does it return?

Thanks, but with that function I get the same result as with the script I indicated above.
The PowerChart and the script are in the Ignition Central, not the Ignition Edge.
Any other ideas please?

Is it not possible to access the information that appears on this web page via script? This is the information I need:

image

Best Regards.