From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run sequence analyzer in .net

I am trying to run sequence analyzer in .net using teststand API. Created simple code based on avaliable libraries.

There is no documentation and official NI support that I contacted some time ago says that they do  not know how this is supposed to work despite fact that this API is public. Contact with support was disappointing to say gently ...

 

 

IAnalyzer analyzer = new Analyzer();
analyzer.Initialize();
analyzer.LoadRulesFiles();

var engine = analyzer.Engine;

var seq = engine.NewPropertyObjectFile(PropertyObjectFileTypes.FileType_SequenceFile);
seq.Path = @"C:\Sequence.seq";
seq.ReadFile(TypeConflictHandlerTypes.ConflictHandler_Error);

var project = analyzer.NewProject();
project.StartFileAnalysis(seq);

while (project.AnalysisStatus.IsAnalyzing)
{
    Console.WriteLine(project.AnalysisStatus.LastStatusMessage);
    System.Threading.Thread.Sleep(1000);
    Console.WriteLine(project.AnalysisStatus.IsAnalyzing);
    Console.WriteLine(project.AnalysisStatus.NumberOfFilesAnalyzed);
}
Console.WriteLine("Done");

 

 

In this code all seems to work but the problem is that analysis is stuck at LastStatusMessage = Preparing for Analysis and never ends.

When I open sequence analyzer tool it finishes in just few seconds.

 

Anyone has an idea what might be the issue?

0 Kudos
Message 1 of 1
(516 Views)