VI Analyzer Enthusiasts Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Run a .cfg test recipe on a Project

Hello everybody,

I'm new to ViAnalyzer community.

I try to run an analyse from a recipe saved in a .cfg file on a Project or a Project Item.

This file only contains the list of tests to perform and their settings.

Here is my problem:

When I load the config file in the ViAnalyzer wizard, I can only add VIs or Folders as test targets. The problem is the same when using the AddItem VI of the API.

Capture.PNG

Capture2.PNG

Using this useful VI (https://decibel.ni.com/content/docs/DOC-29078) I get three interesting informations:

  • A boolean named ProjectBasedAnalysis
  • Stored .lvproj Path
  • Stored target index

That let me think there is a way to perform a test on a project item.

Is there any solution to load a config file and add a project item (like MyComputer or any cRIO target) as target ?

Thanks, Amaury.

0 Kudos
Message 1 of 6
(4,788 Views)

Hello Amaury

there is a way by using the LV Analyzer API. Create a new Task with "VIAn New Task.vi". Get a reference to your Project on which you wanna do the analysis and get all project items of this. Add every item (better is only the .vi files) from your project with "VIAn Add Item.vi" to your analyzer task and run it with "VIAn Run.vi"

_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
0 Kudos
Message 2 of 6
(4,360 Views)

Thanks for your quick answer. I'll try and see if it's not too long to make an AddItem on each VI of a project. I hoped there was another solution that makes me do less code...

0 Kudos
Message 3 of 6
(4,360 Views)

After testing, it takes around 45s to add 1654 items to ViAnalyzer API.

0 Kudos
Message 4 of 6
(4,360 Views)

I feel like this should be possible from the VI analyzer interface within labview. You can tell VI Anaylzer to "Analyze the current project", OR you can load a config file with no VIs in. But, you can't tell it to "Analyze the current project with tests defined in a config file". 

 

I think that would be a really useful feature if you have a set of template configurations you regularly apply and have projects which can sometimes share disk locations - or which pull files from different folders on disk meaning to do it manually you have to add each of the folders that contains code the project calls whilst excluding code in any folders that isnt used in the particular project...

 

Paul

Message 5 of 6
(3,804 Views)

I agree this would be a useful feature, and it is something we can keep in mind for a future release. For now, the best workaround I can suggest is to write a VI that parses the project to get a list of the VIs in the project, then performs a programmatic analysis using a .cfg file with tests pre-selected and configured.

0 Kudos
Message 6 of 6
(3,795 Views)