6 Replies Latest reply on Aug 11, 2017 2:58 PM by Jagan

    Get list of analysis in PI AF SDK



      someone from community pointed me to use following code to get Rollup analysis have  no inputs,this is fine:

      For example, if you have a list of analyses in the analyses variable before, this will print out which Rollup have  no inputs.

      foreach (var analysis in analyses)


         if (analysis.AnalysisRulePlugIn.Name == "Rollup")

              foreach ( var inputs in analysis.AnalysisRule.GetConfiguration().ResolvedInputs)

                 if (inputs.AttributeList == null)

                      Console.WriteLine($"{((AFElement)analysis.Target).GetPath()} {analysis.Name}");


      Now, I'm trying to understand  how I can define list of analysis in analysis variable so use it in code above

      what would the code?