4 Replies Latest reply on Nov 21, 2018 6:43 PM by SyedHussain

    FindPIPoints Fails


      Hi All

      Facing challenge with FindPIPoints function.  I have Data Archive 2016 R2, AF Client 2016 R2 SP1 installed.


      Recently i wrote a scheduler in VB.NET using AFSDK. I know the Tag Name and i need to get snapshot value for it. I am trying with following Code..

      myPoint = PIPoint.FindPIPoint(mytagname.Trim)

      myPIvalue = myPoint.CurrentValue.Value


      But it returns with error "Object reference not set to an instance of an object."

      I used pointID of the this tag and used it in code instead. It works fine and returned tag value. but i only know the tag names and can not hard code the IDs.


      Strangely, I do have another schedule program written and is running fine where i used 

      "myPoint = PIPoint.FindPIPoint(mytag.Trim)"

      "myvalues = myPoint.RecordedValuesByCount(ItemTimeStamp, 1, ....."

      and it returns Tag Value  when i use, no problems

      Appreciate and thanks for any guidance please.