Script to query Persistent Data

I am trying to write a module that will expose a script to query the internal persistent database. the problem I am having is when creating the script for the designer scope i cannot figure out how to get the the gateway context in order to query the persistent database. Can anyone give me some pointers on how to get the gateway context from inside the designer hook?

You can’t get the GatewayContext.

Instead, you have to RPC your intentions to the gateway, execute there, and then return the results.

Fortunately there is a scripting RPC example: … pc-example