2 Replies Latest reply on Aug 31, 2017 12:21 PM by JoelBrabant

    AFAnalysisRule EventFrameTemplate


      I want to get the EventFrameTemplate associated to my AnalysisRule on every AnalysisTemplate I have on my Element.

      When I loop through my elements, I can see in my Watch the property "EventFrameTemplate" from my element.analysis.analysisRule but I can't access it in code...


      Why is that so and is there another way to get access that information?


        • Re: AFAnalysisRule EventFrameTemplate
          David Pugal

          EventFrameTemplate property is not on AFAnalysisRule but on some of the event frame generation plugins (such as EventFrame and AnalysisSQC) that extend the AFAnalysisRule. Thus, it cannot be accessed directly in the code. However, you can use reflection to access it, such as:


            var type = AnalysisRule.GetType();
            var property = type.GetProperty("EventFrameTemplate", typeof(AFElementTemplate));
            var eventFrameTemplate = property.GetValue(AnalysisRule) as AFElementTemplate;


          Please note that the availability of this property is an internal implementation of those plugins and is subject to change any time.

          1 of 1 people found this helpful