Thang Nguyen Posted July 20, 2007 Report Share Posted July 20, 2007 Hi, Could anyone tell me which VI I should use as a control for a supVI, so by which I can pass different typoe of control reference? For example this can be different cluster. I want to make a general VI which can do samething on different kinds of clusters. Thank you, Thang Nguyen Quote Link to comment
jzoller Posted July 21, 2007 Report Share Posted July 21, 2007 QUOTE(Thang Nguyen @ Jul 19 2007, 04:30 PM) Hi,Could anyone tell me which VI I should use as a control for a supVI, so by which I can pass different typoe of control reference? For example this can be different cluster. I want to make a general VI which can do samething on different kinds of clusters. Thank you, Thang Nguyen Hi Thang, You should be able to use an untyped cluster refnum to access generic cluster properties. On the front panel palette (8.2.1), drop a control refnum from the Modern, Refnum menu. Then right click on the refnum and Select VI Server Class..., Generic, GObject, Control, Cluster, Cluster. That should at least get you access to the Controls[] list of refnums in any cluster via reference. Something I don't know: is there a way to programmatically determine the original strict type on the refnum once it's been passed to the subvi? Joe Z. Quote Link to comment
Thang Nguyen Posted July 21, 2007 Author Report Share Posted July 21, 2007 I got it. Thank you. Quote Link to comment
orko Posted July 24, 2007 Report Share Posted July 24, 2007 QUOTE(jzoller @ Jul 19 2007, 03:57 PM) Something I don't know: is there a way to programmatically determine the original strict type on the refnum once it's been passed to the subvi? Yes. I've seen it done two ways: 1) You can use the "Class Name" property on the control reference and wire it up to cases that handle each type of control you're passing into the subVI. http://forums.lavag.org/index.php?act=attach&type=post&id=6424 2) Wire a "to specific class" to the reference and provide a constant of the type you want to test it for. If you get an error, then it isn't that type of control. http://forums.lavag.org/index.php?act=attach&type=post&id=6425 Quote Link to comment
jzoller Posted July 24, 2007 Report Share Posted July 24, 2007 Fantastic! #1 is just what I was looking for. Thanks! Joe Z. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.