URcap variable viewer

Have a look here: URCap Sample: URScript Communicator examples
In particular the class ScriptExporter.