AnsweredAssumed Answered

AFOperations.PlotAttribute Method not working

Question asked by fabiano.batista on Dec 30, 2014
Latest reply on Mar 19, 2015 by fabiano.batista

Hi everyone,

 

Do you have any example on how to make the AFOperations.PlotAttribute method work? From the documentation, it looks straightforward, but when I call the method nothing happens.

 

First I created a new instance of a TrendCriteria object, found the desired attribute to be trended and called the PlotAttribute method, as shown below:

 

strPath = @"\\MYAFSERVER\MyDB\Element1|Temperature";
       
OSIsoft.AF.UI.PropertyPage.AFTrendPage.TrendCriteria criteria = new OSIsoft.AF.UI.PropertyPage.AFTrendPage.TrendCriteria();
criteria.KeyName = "Test";
criteria.ShowTraceLines = true;
criteria.ShowValue = true;

OSIsoft.AF.Asset.AFAttribute myAttr = OSIsoft.AF.Asset.AFAttribute.FindAttribute(strPath, _Database);

AFOperations.PlotAttribute(this, myAttr, false, false, ref criteria);


 

The myAttr attribute is correctly instantiated, however the PlotAttribute method does not open the Trend window for me.

 

Any ideas of what I did wrong?

Outcomes