From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
It would be nice to have an option to resize an array and have the new elements contain the same properties/variables as the first element. The resize array dialog box has a checkbox for "Empty". How about one for "Auto populate from first index" or something?
I currently do a copy and paste into each new element, which is no fun.
One thing you can do to get similar behavior to what you are requesting is to create a custom data type and then create an array of that type. Then, if you resize the array, it will create the new elements as instances of your custom data type.
I've also used a typedef for this, but it is a frustrating extra step. Having a 'default' value that you can set 1x on the top level of the array and have it propigate through, would be handy. Maybe it could be stored as an attribute of the array object? But even using the 1st element as a default for future elements would be better than creating a typedef 🙂