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?
When you change Attributes you have to save the changes. Please see PIPoint.SaveAttributes Method and please also note the code sample.
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?
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.
Interesting. If you change the point security manually in PI System Management Tools as a test for one tag, do you see an immediate change to that tag in PSE?
And where are you seeing the security within PSE?
If I change the security manually in SMT, then I'm able to see an immediate change in the security in PSE by clicking on the attribute, then settings, then the properties button next to the tag name.
Lastly, which version of AF Server and AFSDK are you using?
When I manually change the security in SMT, I see the change as soon as I hit save. I'm seeing the security values in the Point Builder plugin. I'm using AF SDK 188.8.131.52, not 100% sure of which AF server but I can try to find that.
Retrieving data ...