Send / Create variables from URcap, they do not show up in Variable tab

From what jacob said here, it seems that the value of a variabel is only known when a program is running, If you need the value of a polyscope variable in java, could you store it in a separate java variable and pass it to polyscope when needed?