Jump to content

Find Item With No Callers


Recommended Posts

Hi,

I was trying to make a VI that scans a project to find VIs that are no longer used (or dynamically called ;)).

I though my job was done when I found the property "Find Item With No Callers" but when I ran my VI... no luck... see screenshot below.

post-7452-1224756731.png?width=400

Does it mean I will have to get the reference of all the items in my project and use the "callers" properties to find those with no callers ? :o

I'm not being lazy... I just wouldn't like to re-invent the wheel :shifty: .. plus the help for "Find Item With No Callers" says it might not be private forever...

Link to comment

QUOTE

Does it mean I will have to get the reference of all the items in my project and use the "callers" properties to find those with no callers ? :o

I'm not being lazy... I just wouldn't like to re-invent the wheel :shifty: .. plus the help for "Find Item With No Callers" says it might not be private forever...

You need to obtain a reference to the Root of the Project and then read the ProjectItem "Find Items with No Callers"

See below:

post-4274-1225166861.png?width=400

  • Like 1
Link to comment

QUOTE (brianafischer @ Oct 28 2008, 05:09 AM)

Cool, thanks for the hint !

QUOTE (Aristos Queue @ Oct 28 2008, 06:30 AM)

And, just to be explicit, the behavior of that private method *will* be different in a future version of
LV
than it is today. There's a reason it was private for the moment.

You have been warned.

Sure, I merely wanted to know how this method works.

Thanks for the warning.

Link to comment

QUOTE (Aristos Queue @ Oct 27 2008, 10:30 PM)

And, just to be explicit, the behavior of that private method *will* be different in a future version of LV than it is today. There's a reason it was private for the moment. You have been warned.

Ya, but it works right now... besides, that's why it's in the rusty nails forum. :thumbup:

Link to comment

QUOTE (Michael_Aivaliotis @ Oct 28 2008, 02:25 AM)

Ya, but it works right now... besides, that's why it's in the rusty nails forum. :thumbup:

Ah, but sometimes I think some people get lax because so many of our private functions don't change for a long time, or ever, and it is easy to assume that rusty nail will always be there. This one I know code has been actively worked on so it will return different results than it does today in some cases. I figured it was worth the explicit warning.

Link to comment

LabVIEW 7.1 did not have the project environment and therefore does not have this property. If you want to scan a folder for VIs which aren't used, you can try searching LAVA for old posts by E. Blasberg. One of them should have a tool for finding unused VIs.

Link to comment

I can easily think of two options:

1. The method didn't exist back then.

2. You only think you have access to scripting enabled. In 8.x NI locked scripting access behind the license engine and the INI keys do not work like they did in 7.x. You can look through this forum for some workarounds, but nothing is guaranteed.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.