Jump to content

Run sequence analyzer in .net


pawhan11

Recommended Posts

Cross post from NI wesite, i am completely out of ideas:

https://forums.ni.com/t5/NI-TestStand/Run-sequence-analyzer-in-net/td-p/4291037

 

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?

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.