From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

[2019 R3] Launching a project through Veristand API

Hi all,

 Veristand 2019 introduced a new project file format. If I open a project through the UI, it expects me to open a new (nivsprj) file or convert an old (nivsproj) file. However when I try to open files through the .NET API, I get:

  • an error (text follows) for the new format (nivsprj)
  • a success (project gets opened) for the old format (nivsproj)

That causes a sort of conmfusion for me, as now I don't know which file to keep/use.

 

I'm using 

NationalInstruments.VeriStand.ClientAPI.Factory().GetIProject()

function to open the project.

 

Error text (opening nivsprj with GetIProject()):

-307650: Error -307606 occurred at Project Window.lvlib:Project Window.vi >> Project Window.lvlib:Initialization.vi >> NIVSProj_Filemanager.lvlib:LoadDataXMLFile.vi >> NIVSProj_Filemanager.lvlib:LoadProjectXMLFile.vi
Possible reason(s):
NI VeriStand: The file does not contain a valid file format.

 

Any explanations and/or tips on automating the 2019 R3? Thank you in advance!

Piotr F.
Hardware Engineer @ ZF
0 Kudos
Message 1 of 8
(3,433 Views)

Hello iwane,

 

Have you had a chance to view this KB?

__________________________________________
The best way to thank, is to give KUDOS
Message 2 of 8
(3,365 Views)

Hello VA.KI,

 Thank you for the link! I haven't seen it yet. The error is similar, but not the same... In the KB, error location is in NIVS_DataStorage.lvlib:LoadDataXMLFile.vi; in my case the error pops up in NIVSProj_Filemanager.lvlib:LoadProjectXMLFile.vi - I suppose that the location matters. Veristand itself starts fine; the problem appears when launching a project from the API.

 

I think it might be an migration issue, as (maybe) not all features are already migrated to the new file format and both old one and the new one is required for the time being... I'd like to confirm it, though 🙂

 

Piotr F.
Hardware Engineer @ ZF
0 Kudos
Message 3 of 8
(3,346 Views)

Hello Piotr,

 

Fully agree, should be migration issue.

__________________________________________
The best way to thank, is to give KUDOS
0 Kudos
Message 4 of 8
(3,340 Views)

did you get the solution?

0 Kudos
Message 5 of 8
(2,580 Views)

Hi fabio.int,

Yes. I don't really remember the exact issue (and the code that caused it), but after all the solution is to open the *.nivsprj (new project file) file through Veristand command line - calling 'veristand.exe /openProject path_to_proj.nivsprj'. After that, it's enough to create a Workspace2 object. Using GetIProject() also works then, but you should pass the *.nivsproj (old project) file as a parameter (This might be different for non-migrated projects. Ours are migrated from 2018, so have both files). 

Piotr F.
Hardware Engineer @ ZF
0 Kudos
Message 6 of 8
(2,568 Views)

Thank you very much!!!

In my case I have to move from one project to another one, that means that every time I have to close VeriStand and reopen with the right project, isn't it?

 

Fabio

0 Kudos
Message 7 of 8
(2,563 Views)

You might have some luck with Veristand command line (https://www.ni.com/documentation/en/veristand/latest/manual/run-operations-command-line-interface/). I'd give not closing Veristand and just opening a new project a shot.

Piotr F.
Hardware Engineer @ ZF
0 Kudos
Message 8 of 8
(2,537 Views)