AFSDK DefaultPIServer

Discussion created by bslinker on Jul 21, 2014
Latest reply on Jul 21, 2014 by bslinker
I have the following code that works great using AFSDK v4.0.30319 but when I use the same code with v2.0.50727 its not found. what is the equivalent code going from v2 to v4? OSIsoft.AF.PI.PIServer mySrv = new PIServers().DefaultPIServer; mySrv.Connect(); string sExpression = "StmEng_HPT(" + pressure.ToString() + "," + temperature.ToString() + ")"; AFTimeRange timerange = new AFTimeRange("*", "*"); AFTimeSpan timespan = new AFTimeSpan(0, 0, 0, 0, 1, 0); AFValues myvals = AFCalculation.CalculateAtIntervals(mySrv, sExpression, timerange, timespan); double dEnthalpy = (double)myvals[0].Value; mySrv.Disconnect(); If I switch to use the new version of AFSDK then the following references break: using OSIsoft.AF.UnitsOfMeasure; using OSIsoft.AF.Time; using OSIsoft.AF.PI; using OSIsoft.AF.Data; Thanks for any help you can give.