Easy Chart user selected pen persistence

Is there a way to set up the Easy Chart such that the pens that are selected in the vision client persist when the tab that the chart is in is closed and then reopened? Currently the behavior is that if you navigate away from a tab containing an Easy Chart, that when you return to that tab it will reset the pens to the state they were saved in in the designer.

I have the chart running Realtime / Pen Controlled / Lightweight / Auto Applied

Bidirectionally bind the pens chart property (or tagPens, or both) to a Vision Client Tag. Whatever gets saved in that client tag will be the startup default, only for startup. After that, you can open and close the window all you like, and the chart will reload the last set of pens.

You could also use a client startup event to populate that client tag from per-user saved preferences.

1 Like

Ok I bound both of them -- first tagPens and then pens and I did them bidirectionally to the same Memory/Dataset tag. It then deleted everything I had before and now I have no pens anymore.

Exit the designer without saving, or recover your window from a backup.

Then, copy your original datasets to the clipboard and into a text file, so you can put them back after you set up the bindings.

Or put them directly into the client tags before binding.

Ok, working as intended. Ill just remake them, but Ill be aware of this in the future. Thanks

So I did DB pens (pens) bidirectional and it didn't work. Then I linked Tag Pens (tagPens) to the same link bidirectionally and it started screaming at me:

Easy Chart: More than one pen exists with the name "bf20_flow"
Easy Chart: More than one pen exists with the name "bf21_flow"
Easy Chart: More than one pen exists with the name "qn10_flow"
Easy Chart: More than one pen exists with the name "qn11_flow"
Easy Chart: More than one pen exists with the name "bf20_pressure"
Easy Chart: More than one pen exists with the name "bf21_pressure"

over and over until I shut off gateway comms. Cleared the tag binding on DB Pens (pens), and it stopped screaming. Didn't seem to wipe the pens this time. DB pens was still showing all my rows even when unlinked, and Tag Pens was showing no rows. Console is screaming red and everything is basically unresponsive at this point. Designer GUI commands go through but it takes upwards of 60 seconds per interaction, so I can't quickly shut off the gateway comm. Im writing this in the interim.

Removed the contents and binding from the Tag Pens -- I think I want to use DB pens (thats what I was using before). Have that bidirectionally linked to a Dataset memory tag. When I change some of the checked options on it and then save, all in the designer, it undoes my changes and checks all of the pens again. Tried disabling a couple pens in the memory tag and then saving, now this is what it loads to. So changing the GUI itself doesn't stick, but I can change the default state by editing the memory tag.

So, not apparently functioning as expected. Still can't get the pens to stick when changing tabs in the client with the navigation bar.

Just to close the loop on this -- the issue was that the easy chart was running in lightweight mode, rather than the default heavyweight mode. In this mode it does not seem to change the DB Pens "enabled" tags. Heavyweight mode does not have this problem. I don't know why the DB Pens "enabled" field is not updated in the lightweight mode -- the mode doesn't use this field for determining whether or not to query but it still does engage with the field for determining what to show.