lvb Posted May 13, 2008 Report Share Posted May 13, 2008 I recently ran into an issue that I thought I would bring up on the LAVA forums. When dealing with clusters, I have had situations where I would like to access property nodes on specific controls within the cluster. In the past, I have used the Label.Text to identify the desired control and eventually migrated to a enum typedef representing the "order" of the control. This would allow me to rename the labels without breaking my code and upon re-ordering the cluster, I could just update the typedef which would apply all changes on a global basis. Are there any other ways of obtaining a strict reference to a control of a cluster that is "absolute" (I don't have to search for the Label.Text in a for loop or use my enum method)? I find it interesting that I can create an implicit reference, yet I cannot obtain a refunum from this property node. Thanks! Quote Link to comment
ASTDan Posted May 13, 2008 Report Share Posted May 13, 2008 Hello, The easiest way I have found is to right click on the element in the culster and select "Create Property Node". You then get a propery node for the individual control in the cluster. I have also shown another way of getting the reference to an individual control in a cluster Hope this helps Dan Quote Link to comment
jgcode Posted May 13, 2008 Report Share Posted May 13, 2008 What about trying this? You can access the element's reference thru the cluster's reference by right clicking Quote Link to comment
lvb Posted May 14, 2008 Author Report Share Posted May 14, 2008 QUOTE (jgcode @ May 12 2008, 12:02 AM) What about trying this?You can access the element's reference thru the cluster's reference by right clicking ASTDan, thanks for the reply. I have been currently using the methods you demonstrated (using a enum typedef for the array index). The limitation to this is that if you re-order the controls of the cluster your refnum index is no longer valid. jgcode, this is exactly what I was looking for! Sometimes you just have to dig a little deeper within LabVIEW because there are so many features. Quote Link to comment
jgcode Posted May 14, 2008 Report Share Posted May 14, 2008 QUOTE (brianafischer @ May 13 2008, 07:56 AM) jgcode, this is exactly what I was looking for! Sometimes you just have to dig a little deeper within LabVIEW because there are so many features. I know what you mean, I used to do what you did or I would unbundle the cluster then make an indicator from the elements just so I could get a reference! But it was one of those a-ha! moments when we found it. I have been playing with VI server and refs a fair bit lately - I am constantly amazed at all the things you can do. Thats why I love LabVIEW 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.