LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find Object.vi function of 3D picture control - when object not found

I am using Labview 8.2, and this post is regarding the 3D Picture Control.

I am wanting to make use of the "Find Object" VI to either return a reference to a named object, or otherwise determine that it does not exist yet.  However, if I call it with the name of an object that doesn't exist yet (i.e. just any random string), it returns an error message that arises from the attempt to release a queue (the reference to which gets lost when crossing a zero-iteration For Loop's tunnels), instead of an error message that says "Object not found" which I would find much more useful.  With a simple modification of the "Find Object.vi" function, this behaviour can be changed, by replacing the For Loop's tunnels with shift registers.

The problem with the current function is that the error is not an intentionally thrown error, rather just the result of the queue's refnum being set to the default 0 as it "exits" the For Loop, since in the situation that an object is not found, the code passes a 0 to the N terminal.

The attached images show the problematic code and the simple modification
Download All
0 Kudos
Message 1 of 2
(2,237 Views)
pauldavey,

I agree with you - the current way of handling the case of an object not being found does not appear to be ideal.

This was reported to R&D (# 43D8GSVQ) for further investigation.

Thanks for the feedback!

Regards,

Simon H
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,219 Views)