[PD] Query Pd internal variables from a patch