regisphilbin Posted June 1, 2004 Report Share Posted June 1, 2004 Just curious, I'm creating a UI that will modify elements in a cluster and was wondering if the following picture depicts the best solution. I have a boolean button that, when pressed, will trigger a corresponding boolean within the cluster to change its state. I'm using Value Signaling. I guess I was interested to see if this could be done without using a FOR loop to determine which element in the cluster I'd like to reference. Quote Link to comment
Steve_Brooks Posted June 1, 2004 Report Share Posted June 1, 2004 If you know the index of the control in the cluster (cluster order) then you can use Index Array function and not have to go through the entire cluster in the for loop. The thing you have to be careful of here is if the cluster order changes. You could also use the Search Array function to find it's index then use index array to get the controls reference that way. Hope this helps. :thumbup: Steve Quote Link to comment
JohnRH Posted June 2, 2004 Report Share Posted June 2, 2004 Another option (not necessarily better) is to convert the variant back to a cluster then just bundle the new value. Of course this requires the cluster constant which then requires you to make it a type def (for 'safety'). Maybe not worth the hassle. Quote Link to comment
didierj Posted June 2, 2004 Report Share Posted June 2, 2004 ...or just right click on the control (withing the cluster, and not the cluster itself) of which you want its value changed, and create a "property node". This way one can change the value of a cluster element without having to bundle and unbundle the whole stuff. You can also use this way to change/read a control value even if you have a boolean with latch action in the cluster. Didier Quote Link to comment
Steve_Brooks Posted June 2, 2004 Report Share Posted June 2, 2004 ....didierj definitely has the best solution ( way better than my first post ). This way you don't have to worry about any changes to the cluster. Quote Link to comment
regisphilbin Posted June 3, 2004 Author Report Share Posted June 3, 2004 Thanks for all the great solutions and ideas! Hmmm...A little twist seems to be that you can't "click" on a cluster element thats Strict Type Def. So what I ended up doing (correct or not) was disconnecting the cluster from the Strict Type Def, select the control within and creating its property node, then replace the cluster back to its original Strict Type Def. form. This seems to work although a slight workaround.... 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.