AnsweredAssumed Answered

What is the best way to get all Tag Values out to a csv file for a date range

Question asked by LindseyHatfield on Aug 21, 2018
Latest reply on Aug 30, 2018 by LindseyHatfield

We are extracting data from our PI Archive for a month (when there was a major event) to use as a feed into a simulator.

We don't need all points but as we need 77,000 points of the 80,000 we have we may as well get  them all for that data source.

I am a newbie programmer although have been working with PI for 20+ years doing Support and administration. I have started this by using a program that extracts the data for a set of points for a entered time range and it uses

We actually don't even require the TAG name for the output but do need the Extended Description which we use to link data system values

I can do this point by point using the call


targetMemberPoint As PISDK.PIPoint = GetPoint(iTargetServer, pointName)

values = sdkPoint.Data.RecordedValues(startTime, endTime, BoundaryTypeConstants.btInside, "", FilteredViewConstants.fvShowFilteredState, Nothing)


ptAtt = sdkPoint.PointAttributes("exdesc")

                then some formatting stuff.

If value.IsGood Then

    sb.AppendLine(ptAtt.Value.ToString & "," & value.TimeStamp.UTCSeconds.ToString & "," & sValue.ToString)

End If

Then write to the file, which works fine point by point, but how do you get all points as a stream of records in time order not point order ?


The output is currently like

ExDescTime (UTCSeconds)Value




Can I still use the _Data.RecordedValues call without a point defined ?