LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
Showing results for 
Search instead for 
Did you mean: 

VI Analyzer Test - Not a Refnum Usage

Status: New

In this thread on LAVA, Aristos Queue points out some common usage patterns of the "Not A Number/Path/Refnum?" function that can result in performance problems and/or race conditions.  He recommends either (1) comparing a refnum against a null constant value, or (2) trying the refnum operation you were going to do anyway, and using the error output from that operation to determine if the refnum was valid.


I propose a VI Analyzer Toolkit test that checks for this scenario called "Not A Refnum Usage".  The test would return a failure under the following circumstances:


  • The input to the "Not A Number/Path/Refnum?" function is a refnum data type.
  • The refnum is any type other than Occurrence.
  • The output of the "Not A Number/Path/Refnum?" function is wired to anything other than a Boolean indicator.

If these conditions are met, the test would return a failure, and would make the two recommendations mentioned above as alternatives to using the "Not A Number/Path/Refnum?" function.

DNatt, NI
1 Comment
Active Participant

Even if I didn't use VI Analyzer, you still deserve a kudos for linking to that information from Aristos Queue.  I am now adding another practice to avoid to my long list.