06-30-2023 01:42 PM
Hello
I want to use another control to change the index of a array on the front panel. It must be possible right? I can not find it though. Can someone tell me how to do this ?
thank you for the help !
Solved! Go to Solution.
06-30-2023 01:53 PM - edited 06-30-2023 01:54 PM
Can you elaborate a little more? What do you mean by another control? What was the previous control that you used?
06-30-2023 01:58 PM
thank you for your reply !
I would like the master control to be able to change the index of the slave array.
06-30-2023 02:26 PM - edited 06-30-2023 02:43 PM
Can you show a picture of your block diagram? But attaching your code would be better.
I think I kind of know what you mean. See attached code. Is it similar to what you are talking about?
06-30-2023 02:44 PM
There is hardly anything in the code it is just a master control the number there is now 0 when I change the master control to 1 I want the index from the slave also to change to 1 etc.
So if the data in the array is 1 2 3
and master is 0 then the index should also be 0
the index is indicated with a red arrow. When I change the master to 1 the index should also change to 1
I can am not able to connect the master control to the index, also not with the property node.
06-30-2023 03:02 PM - edited 06-30-2023 03:05 PM
I modified. Try the attached code. Is this what you are trying to achieve?
06-30-2023 03:27 PM
Yes that is what I was searching for, the thing is, I was searching for the property node of the index of the array but it seems there is none ? I think this will work though.
thank you !
the reason why I needed is a little bit more complicated but I am too tired so I will explain it another time. Thanx for the help
06-30-2023 03:47 PM
Create a property node for the array.
Pick the "Index Values" property.
Wire your Master control to this property with a Build Array on the wire.
What this property does is set the top left position of the array as the row (column, page) you specify. If your array is multi-dimensional, you will need one value for each dimension.
06-30-2023 04:03 PM
@its_me I would highly recommend to do as aputman showed.
06-30-2023 04:13 PM - edited 06-30-2023 04:21 PM
Typically, changing the index is confusing to the user but some use it to display exactly one element of an array. In that case, you could equally well just index out that one element.
If you show multiple elements and scroll around with the index, I recommend to also show the scrollbar.
Yes, the indexvals property is the correct way to do this. Here's a quick rewrite:
You probably want to hide the index terminal in this case, else you need to deal with the case where the user tries to change it.