Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Get all Project items

Is there a way to get all files in a project by using vi scripting?

I don't want only all VIs in memory...

0 Kudos
Message 1 of 8
(8,788 Views)

Use the Get All Descendents method:

proj.png

This code removes empty paths from the list (for things that don't have paths, like variables, targets, etc.). Thise code does not remove duplicates (like if you have the same file under multiple targets). And you can specify filters on the method, like whether you want to exclude dependencies.

Message 2 of 8
(6,195 Views)

Nice!

Thanks!

0 Kudos
Message 3 of 8
(6,195 Views)

I want to know if there are any broken vit in the project, now that i've the list of all VIs i can filter for the ".vit" only.

But, how can i know if the selected vit is broken?

If i use the execution.state method i always get "Bad" because the vit is not running.

I don't want to run these VIs...

0 Kudos
Message 4 of 8
(6,195 Views)

Read the help on the execution state. Bad means cannot execute, Idle means no running.

0 Kudos
Message 5 of 8
(6,195 Views)

Ok, i've read the help but:

GetAllProjectVit.png

Every single .vit in my project is not broken, and of course, in the other side of the case structure there is a false

Is there something I'm missing in the operation of the property node?

0 Kudos
Message 6 of 8
(6,195 Views)

You're converting a full path to a string and feeding that into the Open VI Ref function. I'm guessing that's returning an error.

You should either give it a full path or just the fully qualified name (if the VI is already in memory, which I'm not sure if it is if it's just in the project, so you should stick with the path).


___________________
Try to take over the world!
0 Kudos
Message 7 of 8
(6,195 Views)

Indeed...

There is an error

I finally resolved, thanks to everybody!

0 Kudos
Message 8 of 8
(6,195 Views)