gajendra_konnur

How to find event frame using afsdk

Discussion created by gajendra_konnur on Aug 23, 2012
Latest reply on Aug 23, 2012 by gajendra_konnur

Hi All,

 

I am trying to find out event frames within specific starttime ,endtime and name ,using afsdk shone below,But its not working.

 

Anybody have idea what is wrong with the code??

 

PISystems myPIAFSystems = new PISystems();

 

AFDatabase myDB = myPIAFSystems["ctsinnvlvsap5"].Databases["PSEG"];

 

            string efnamefilter = "Nitogen_Cylinder_Pressure*";
            AFCategory afcat=new AFCategory();
           
            AFElementTemplate aftemp=new AFElementTemplate();
            AFDurationQuery[] afduration=new AFDurationQuery[3];
            object starttime = "8/23/2012 2:00:59 PM";
            object endtime = "8/23/2012 2:06:59 PM";
    

 

AFNamedCollection<AFEventFrame> ef =
            AFEventFrame.FindEventFrames(myDB, null, AFSearchMode.Inclusive, starttime, endtime, efnamefilter , "", afcat, aftemp, afduration, true,     AFSortField.StartTime, AFSortOrder.Ascending, 0, 1000);
           

 

 

 

Regards,

 

Gajendra Konnur

 

           

Outcomes