1 Reply Latest reply on Apr 18, 2018 9:10 PM by Rick Davin

    AF SDK fetch digital tag value


      How to fetch the digital tags associated state name in programming VB.NET

      myOpening = OSIsoft.AF.PI.PIStateSets(myOpening)

      returns i ?


      Thanks and appreciate

        • Re: AF SDK fetch digital tag value
          Rick Davin

          Hi Syed,


          First of all, you appear to have a circular reference with how you have used myOpening.  Secondly, the call to PIStateSets should be in context of an PIServer object.  See Live Library Hlelp for PIStateSets.  Note that an item from the StateSets is an AFEnumerationSet, that is there is no PIStateSet object, though if it helps you to think of it as such, you can name your variables accordingly.  Likewise an AFEnumerationSet contains AFEnumerationValues (or to be accurate, it contains 1 or more).


          There is a code example for AFEnumerationValues that you may find useful.

          2 of 2 people found this helpful