AnsweredAssumed Answered

How to access AF server using PIserver.PIsystem property

Question asked by amitvankudre on Sep 6, 2017
Latest reply on Sep 7, 2017 by Eugene Lee



I am using AFSDK and trying to access the PI AF Server associated with one of our PI Data Archives. I am using the PIServer.PISystem property of the PIServer class of OSISoft.AF.PI namespace. However it is returning a null value. Below is my code :


objPIServer = objPIconnect.ConnectPI(AFServerBox.SelectedItem.ToString()); // PIserver object;the ConnectPI() method connects to the PI server and returns the server in objPIServer object

var x = objPIServer.PISystem;



The x evaluates to null.Can someone confirm why so ? I need to either access the PI Data archive associated with an AFServer or vice versa.


Appreciate any help in this regard.



AMit Vankudre