VI Analyzer Enthusiasts Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Make VIA Results paths to .vis relative?

Solved!
Go to solution

I'd like to include the Results into a project, or offload the VIA to a nightly process that might not have the same absolute folder structure.  Is there a way for VIA accept relative paths?

0 Kudos
Message 1 of 9
(8,365 Views)

I believe the paths stored in both .cfg and .rsl files are relative. So if you save your .cfg/.rsl in a certain location relative to the VIs being tested, and on another system the .cfg/.rsl is in the same relative location to the VIs being tested, it should "just work".

0 Kudos
Message 2 of 9
(4,812 Views)

I'm trying to do the code analysis as a part of a code review from my laptop and send the results file to a coworker (who has the code checked out to a different path).  This isn't working.  The .RSL file only has absolute paths (as it probably should).

I can make a quick .vi that can fix the paths in the .rsl file and rewrite the .rsl file.  However, I need the RSL Exporter to return the Test Config Data cluster as well. Darren, can you add that output to that utility?

Thanks!

0 Kudos
Message 3 of 9
(4,812 Views)

I have updated the RSL Exporter to return the Test Config Data cluster array:

https://decibel.ni.com/content/docs/DOC-26552

Still though, I'm wondering why things aren't working for you. If you save the .rsl file to a certain location, and copy it to another machine where it is in the same relative location to the analyzed VIs as it was on the first machine, it should work.

Message 4 of 9
(4,812 Views)

The .vi paths may have been a red herring.  I get a "reference is invalid error".  Could it be that it's not finding the custom test?  The Test Path for the custom test looks like :

..\..\..\Users\dan\Documents\LabVIEW Data\VI Analyzer Tests\CTI custom tests\Code Review.llb

So that would be change for a different user.

0 Kudos
Message 5 of 9
(4,812 Views)

Thanks for the info. I think I may have a problem when saving or loading RSL files and not treating paths to custom tests correctly. I have filed myself CAR 492018 to look into the issue in more detail.

0 Kudos
Message 6 of 9
(4,812 Views)

I might have a clue.  I made my .vi to adjust the paths of the custom test.  If I run the code in LabVIEW it works well.  If I build it into an .exe and run it, it fails.

My guess :

The Test Path  I put into  VIAn Easy Report.vi is an absolute path. (Whereas in RSL Exporter, it comes back as a relative path.  Somebody is calculating a relative path!)

When I built my "path adjustment code" into a nice little .exe (so I can associate .rsl files with this utilitly and quickly & easily get them adjusted by double clicking those files).  However, I suspect that the .exe build is screwing up the VIA code that is calculating the relative path (it's probably relative to something in the .exe, not in .vi lib or wherever it should be calculating from).

Is the Test Path stored as an absolute or relative path in the .rsl file?

-D

0 Kudos
Message 7 of 9
(4,812 Views)
Solution
Accepted by D*

I just double-checked...the test path stored in the RSL file is always relative to the LabVIEW folder, even for custom tests. My fix for the CAR will be to store a token along with the test path to indicate if it is in the LabVIEW folder or the [LabVIEW Data] folder. I do this for CFG files, it looks like I forgot to do it for RSL files.

0 Kudos
Message 8 of 9
(4,812 Views)

CAR 492018 is fixed in LabVIEW 2015.

0 Kudos
Message 9 of 9
(4,812 Views)