Quickest way to load million points using PI-SDK

Discussion created by amt-sybex on Jun 10, 2009
Latest reply on Aug 14, 2009 by ken

I wanted to run a test to see how long it would take to load 1million points into PI using the SDK. I have limited knowledge of the SDK but would like to know if there is a quicker way to do this?


If ConnectToPI() Then

    myStreamReader = File.OpenText("c:\osisoft.txt")

    Do Until myStreamReader.EndOfStream

        strContents = myStreamReader.ReadLine

        psArray = Split(strContents, ",")

        psMPAN = Trim(psArray(0))
        pdReading = CDbl(Trim(psArray(2)))

        Me.PIServer.PIPoints.Add(psMPAN, "base", PISDK.PointTypeConstants.pttypString)

        PIServer.PIPoints(psMPAN).Data.UpdateValue(CStr(pdReading), "*", PISDK.DataMergeConstants.dmInsertDuplicates)


End If