Bind Rectangle/Circle/Polygon/Line Styles to DataSet tag

Good evening,

Let me start off by saying what I am trying to do, and if anyone has any alternative suggestions I'm listening.

I am building some Vision templates and want to have animated colors for Active Unacknowledged Alarms that are based on Highest Active Unacknowledged Priority. I haven't really found a great way to do this, but the route I was headed down was to create Styles for drawing shapes (Rectangle/Circle/Polygon/Line) that utilize a custom property "HighestActiveUnacknowledged" integer to determine the color/blink.

This is easy to set up on a single component instance; and easy enough to copy from one to another, and include that shape in all of my templates linking it appropriately.

What I was REALLY hoping to do was to take the Style DataSet from my test object, copy it, and paste it into a new DataSet Tag I'm calling "AlarmPriorityPathStyles." I was then hoping to link bind every instance of this alarm indication shape's Style DataSet to the global dataset. That if I want to change the Alarm Priority steps/durations/colors for these shapes, I can just go to that Tag and update the animation duration and colors (e.g. java.awt.Color[r=170,g=170,b=170]) in a single place.

However, that last column for "strokePaint" is of type "Paint" which is not an option when you create a DataSet tag. If you just copy the Styles DataSet info and paste it in the global tag, you get "Error_TypeConversion." As a last ditch effort, I tried to re-create the Paint column as strings, hoping some implicit type conversion could happen on the shape component at run time, but nope.

Am I stuck just copy-pasting this style everywhere?

Hmmm. Tags have restrictions on what can be in datasets to prevent serialization problems in their persistence storage. Restrictions that don't apply to Vision properties. Not sure if Paint could be added to the whitelist for tags.

In the meantime, try using a client tag instead of a gateway tag. Not sure if the datatype restrictions apply to those.

1 Like

Good advice! It actually seems to have allowed it, but the problem is now that there is now way to edit type "Paint" from the DataSet editor, so its fixed in stone forever, or until I copy values from a Style Customizer over it in the future. I think this will work as these values aren't likely to change much. Thank you for your endless support!