01-06-2011 09:43 PM
Hello everybody,
I've came across a problem, in a top-level VI, I want to know:
a> the total nodes count
b> nodes count which are member of vi.lib
c> nodes count which are member of user.lib.
Now after using 'SuperPrivateScriptingFeatureVisible=True' & 'SuperSecretPrivateSpecialStuff=True', I got a private property node 'Matrics >> Advance' and using the cluster output of the 'read only' property, I got the total nodes count.
Now the actual problem is to know, out of total nodes, which all are member of vi.lib and user.lib.
01-07-2011 12:35 AM
Hello,
You can use the "callees' paths" property to find first levels subVI and then parse the path to see if it's use.lib, vi.lib or elsewhere.
Hope this helps.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
01-07-2011 01:05 AM
Hi,
Thanx for the quick reply.
I tried this method of filtering different nodes based on the path.
But I'm looking for, if there is any direct property/method.
01-07-2011 01:15 AM
I don't think there is a property that will tell vi.lib appart from user.lib.
I think there will be a way to tell appart VIs from primitives but that's all.
Sorry
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
01-07-2011 02:58 AM
Oh... how about that?
I've made a small utility that you can launch from a VI and it fills up a tree showing the VI's dependencies (subVI) in a Windows explorer way. The video below show it from an OpenG VI.
I can't share it right now because of some internal dependencies, but that could be done (maybe).
Would it help you?
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
01-07-2011 04:40 AM
Just to give you some background:
Nodes are a lot of different things: Functions, Structures, SubVIs, ... are you interested in counting ForLoops as well?
In your case, I'd use the TRefTraverse (It's in the Utility folder) to get all SubVIs. Then check the path. There are some OpenG 'Path Constants' for vi.lib and user lib. So just wire the output of the TRefTravese and check VI.path against does constants and count up.
Alternatively, you can use the Vi.Calees property. But this will only return you one count for each SubVI no matter how many instances you placed in the BD.
Felix
01-07-2011 04:57 AM
@f. Schubert wrote:
Alternatively, you can use the Vi.Calees property. But this will only return you one count for each SubVI no matter how many instances you placed in the BD.
Felix
That's true, I hadn't thought about that 😮
I could integrate that to my utility and display the number of instances for each subVI, good idea!
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus