12-12-2025 06:16 AM
Hi,
I have created a cluster that contains 4 arrays of strings and 2 boolean buttons.
I want to be able to write data in different elements of the string arrays but dont understand how.
I only manage to write data in the first element of the array. But i want to be able to reach all elements.
I want to write data by reference.
Se attached VI for more info
Im sure someone has a nice solution.
Solved! Go to Solution.
12-12-2025 06:39 AM
like this?
12-12-2025 07:10 AM
Lets say i want to write data in array 1 at index 1 (10) and 3 (50)
How do i do that when using references?
12-12-2025 07:33 AM
Hi tokar,
Would something like this be enough for your use ?
12-12-2025 05:13 PM
Writing to an array element ...
Will only write to one element, and you usually don't know which one (it's whichever on last has text focus).
12-13-2025 08:15 AM
I tried to implement your code but it seems like you dont use the same reference that i do, so i dont make it to work.
Perhaps you can implement your example into my code? Because i dont made it to work.
Code is in snippet, also attached as vi.
12-13-2025 08:32 AM
I dont understand your reference in the beginning, because i use a reference to a cluster that contains arrays of strings etc. When i wire that to proberty node and choose value as output i get variant and not 1D array of strings as in your example.....
12-13-2025 10:02 AM
They used a strict reference, i.e. a reference that includes the type. Your typedef only has generic array references.
You can either use the generic reference and use variant to data
variant to data
Or you can cast the refnum to a strict array reference. Create the type by right-clicking one of the string array references and selecting create>>constant.
strict array refnum
In both cases, make sure to handle errors if the array is not actually a string array.
Insert into array will only insert one past the last element. So you cannot insert at index 2 into an empty array. To do that, you need to reshape the array first.
12-13-2025 12:52 PM
I tested but dosent work as you can see below.
12-13-2025 01:20 PM - edited 12-13-2025 01:38 PM
Like I said, insert into array does not insert at index 2 into an empty array. Change the index to 0 or resize the array before inserting.
Also, show the scrollbar and scroll up.