LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find all files in a project

I'm not positve, but I suspect that this is not the best way of getting this information, just seems like there should be an easier way.  I'm trying to get a list of all the vi's in a project, so that the test application can be zipped up with the data it generates.  This is what I came up with...

 

P.S. the attachment is LV8.0 (but I'm using 8.5)
0 Kudos
Message 1 of 12
(5,109 Views)
0 Kudos
Message 2 of 12
(5,099 Views)
Perhaps I should point out the vi is zipping its own data AND project (and hopefully all of the projects major files) programmatically.
0 Kudos
Message 3 of 12
(5,067 Views)

I'm not sure I understand what you're driving at...

 

Side-note: in your code you have this:

 

which can be replaced with this:

 

Message Edited by smercurio_fc on 10-22-2008 08:50 AM
Download All
Message 4 of 12
(5,061 Views)

Hi

 

I was going for the same type of solution, but I have a basic question: How do you open/get a reference to a specific .lvproj file?

 

Regards

/Mattias

0 Kudos
Message 5 of 12
(5,048 Views)

I do this ...

 

0 Kudos
Message 6 of 12
(5,041 Views)

Ah thanks for that!

 

What I'm really getting at is: Are four property nodes and two for loops needed to get this information?   or is there some other property node or other method that would simplify things.  (like you just did with the empty/path string thingy)

0 Kudos
Message 7 of 12
(5,038 Views)

Hi,

 

I am not exactly sure what you are looking for as an answer, but your code looks like the best way to implement what you want to do. So good work.

 

 

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 8 of 12
(4,998 Views)

Not quite. Smiley Wink The code relies on using the Dependencies property. Two problems with this: (1) You need to manually refresh the Dependencies list, if you actually use it (I usually don't); (2) the Dependencies list isn't the same as the VIs in the project. This is a list of all VIs used. In other words, the entire hierarchy.


So, the question is: are you trying to get the list of all VIs used, in which case you would need to use the Dependencies property. Or, are you trying to get a list of the project's items which are VIs? What about libraries and other files that may be in the project?

 

Also, to the question about getting a project reference, an easier method is to use the Application class'  "Project.Open" method:

 

Message Edited by smercurio_fc on 10-22-2008 05:15 PM
Message 9 of 12
(4,988 Views)

Thanx.

 

For my application/tool I'm trying to get just a list of all vi:s in project file. I have not worked out the solution I want yet... I find it tricking when folders (eg. children reference) are included in the file. I can make it easy and do "expand all" + "ctrl a" in the project file and do the above... resulting in empty paths for all my folders..

 

 

 

 

0 Kudos
Message 10 of 12
(4,961 Views)