1 Reply Latest reply on Mar 27, 2015 12:37 PM by Rick Davin

    AF SDK - GetValues() without getting any interpolated values?


      Is there a way to get all the archive values between two times, and guarantee that none of the values will be interpolated?


      IAFAttribute.GetValues() seems to always interpolate the end values if there are no values at the first and last timestamp. Do I have to first find the actual timestamps of the first and last archive values in the time range and then adjust the timerange itself before calling GetValues? Seems a bit of a pain!


      --- Alistair.

        • Re: AF SDK - GetValues() without getting any interpolated values?
          Rick Davin

          That depends on the data reference.  And if we are talking about PIPoints here, what you want is better achieved through the RDA RecordedValues method with an AFBoundaryType.Inside.  It was fastest and simplest to do what you what to do.


          For an AFAttribute, it would be something like:


          attribute.Data.RecordedValues(timerange, AFBoundaryType.Inside, uom, filterExpresssion, includeFilteredValues, maxCount)

          1 of 1 people found this helpful