AnsweredAssumed Answered

Coresight Extensibility - Multistate Options

Question asked by patrick.mechenbier on Mar 13, 2017
Latest reply on Mar 21, 2018 by kbobeck

I'm developing a few symbols for Coresight (using 2016 R2) that are going to exclusively used as multistate symbols. After looking through the 2016 R2 extensibility guidelines and poking around in some of the JSON returned for saved displays, I have two questions:

  1. In the symbol definition, is there a way to turn on the multistate behavior by default when the symbol is initialized on a display?
  2. In the symbol definition, is there a way to specify colors to use for possible states?


For the first question, since these symbols are going to be used exclusively as multistate symbols, I don't want to make the user right click on each symbol instance and click the "configure multi-state..." option to turn on the multistate behavior. There are going to be a fair amount of instances of these symbols on a display, so right clicking each new instance would be a tedious exercise. I noticed a MSDataSources property in a saved symbol's JSON definition - would adding the initial DataSource array value used to initialize the symbol to this array in the symbol's init function effectively accomplish this behavior (or would this be the recommended way)?


For the second question, these symbols will be used to visualize a data point on a class of equipment that all have similar values for the same data point (some manufacturers use slightly different terms, but they're similar enough). Is there a way that I can configure the symbol to display a value (if it exists within the state set) as a certain color? I'm envisioning something like this:


Symbol.Configuration.DefautMultistateValues: [
        color: '#ff0000',
        values: ['closed', 'energized']
        color: '#00ff00',
        values: ['open', 'denergized']


So if the attribute/PI Point used to initialize the symbol on the display has a value of 'closed' or 'energized' in it's state set, the symbol would use red as the color for that state, without configuration from the user. This would save the user from having to configure each and every instance of the symbol dropped on the display. I took a look at the States array in a symbol's Configuration.Multistates object for clues, but there are some properties of each state that i didn't know how set (or if it would be supported).


Let me know if you have any questions or if anything above is unclear (or find me at the 2017 UC to discuss!).