AnsweredAssumed Answered

how to create af analysis with output attribute through af sdk

Question asked by VarbanVarbanov on Dec 20, 2016
Latest reply on Dec 21, 2016 by VarbanVarbanov

Hi, I'm trying to create AF Analysis with output attribute. I was trying various of combinations of the commented code below without success (analysis is allways created without output attribute reference). AF Sdk documentation does not explain anything different than already said in the method name:


  ana = new AFAnalysis(AFDatabase, an.Name);                
  ana.AnalysisRulePlugIn = _connection.PISystem.AnalysisRulePlugIns["PerformanceEquation"];
  ana.AnalysisRule.ConfigString = an.ExpressionString;             
  ana.Name = an.Name;
                    //var att = element.Attributes["TestA"];
                    //ana.AnalysisRule.GetOutputs().Add(att); // not that expect this to work
                    //ana.AnalysisRule.VariableMap.SetMapping("Variable1", new AFVariableMappingData(att));
                    //ana.AnalysisRule.MapVariable("Variable1", att);
                    //ana.AnalysisRule.MapVariable("Variable1", "TestA");



I would like to create the output attribute wothout writing tha analysis output to PI and to create the attribute with the analysis creation if possible, i.e I want to do the following:




Please, tell me how to do this!


Thank you in advance!