I can't for the life of me seem to figure out the correct string to pull the point source attribute for a PI tag.
If I do
(foreach pinpoint in PIPointList)
string source = (string) pinpoint.GetAttribute("pointsource");
The error says the attribute "pointsource" cannot be found it must be loaded first
You have to call LoadAttributes first. This is noted in the documentation. Loading the point attributes is a separate remote call, so you should probably use the LoadAttributes method on the PIPointList to load them in bulk.
The following code (or something similar) will get you a list of all the attribute names, so you can be sure your attribute name string is correct.
PIPoint piTag = PIPoint.FindPIPoint(_piServer, tagName);
List<string> atts = piTag.FindAttributeNames(null).ToList();
atts.ForEach(a => Console.WriteLine(a));
You can look at the list while you are in the debugger or print them out to the console as above. And, as Mike said remember to load the attribute before you call GetAttribute
Retrieving data ...