Get "System" State values via code

Discussion created by davidl on Nov 20, 2014
Latest reply on Nov 23, 2014 by davidl


I'm using AF SDK while our PI server has 3.4.390.16 version.
The PI server was upgraded several times, it has old (custom) sates at SYSTEM set.

For example at SYSTEM set:

State ID, Name
307         * BAD *
309         * CALC FAILED *


My application subscribes to snapshot Pipe and receive new points values events.
Unfortunately, values that has SYSTEM state translated to the "AFSystemStateCode" enumeration values ("Bad", "WrongType" instead of "* BAD *" & "* CALC FAILED *").


Is there a way to get the real values that are defined in the "SYSTEM" set?
Replacing the string values inside the "SYSTEM" set is not an option since there are many OSISOFT interfaces as well as custom interfaces that are using the existing states from the "SYSTEM" set..