We are starting to look into the power chart control in Perspective. We would like to provide a button on the screen that will save the chart config to a memory document tag. This can later be recalled by reading this tag and overwriting the chart properties with the value of the tag. Has anyone done this? If so did you it similiarly or is there a better way?
I have this script on a button.
|from com.inductiveautomation.ignition.common import TypeUtilities|
|# Grab the property you want to save as a JSON object|
|jsonObj = TypeUtilities.pyToGson(self.getSibling(PowerChart).props)|
This correctly writes the props JSON object into the tag, how do i now read this tag and write it back to the powerchar props? TypeUtilities.gsonToPy? Doing this throws an error.