5 Replies Latest reply on Aug 21, 2016 6:35 PM by gregor

    Checking changed values into Pi Data Archive using AF SDK

    JWKelly

      I am writing a program in the AF SDK to change the point security and data security of a few Pi Points. How do I check in the changes to the Pi Data Archive once I've editted these values?

        • Re: Checking changed values into Pi Data Archive using AF SDK
          kduffy

          Hi Justin,

           

          The PI data archive does not have a sandbox to hold pending changes like the AF server does; everything is committed immediately.

           

          Is this matching the behavior you're seeing? If not, can you post some of the code you're using?

           

          Kelsey

            • Re: Checking changed values into Pi Data Archive using AF SDK
              JWKelly

              Basically what I'm doing is calling PI Points by their Point Source and then prompting the user to essentially build the point security and data security using the command line and two string builder objects. Then I'm adjusting this attribute value in the list of attributes for these points, kinda like this:

               

              foreach (PIPoint item in ptList)

                          {

                              IDictionary<string, object> attrList = item.GetAttributes();

                              attrList["ptsecurity"] = ptsec.ToString();

                              attrList["datasecurity"] = datasec.ToString();

                          }

               

              I've exported the initial configuration of the points into a .csv backup file and then done the same thing to another file after changing these values. They show up as changed in the second file, but when I look at the points in System Explorer, they still have the initial values for point security and data security.