04-14-2010 09:07 PM
Solved! Go to Solution.
04-14-2010 09:56 PM
Here is one way.
04-14-2010 10:03 PM - edited 04-14-2010 10:04 PM
Get a reference to the array element, cast it to the more specific type numeric. Write to its Representation property node.
Of course the array will have to be in a different VI then the one that is the script you are running because that property node can only be used on a VI that is in edit mode.
Edit: Darin beat me to it.
04-15-2010 09:58 PM
04-15-2010 10:25 PM
You're not asking for much, are you? Why do you want to do all this in scripting?
You can do an Invoke Node on the reference to the array element and use the Replace method. (There is also a Replace No Attributes method.) I don't know what is the best way you can handle the "arbitrary type" requirement. There is a long list of items you can choose from for the Style input. And the path input could let you choose your own typedef controls.
04-15-2010 10:34 PM
A slightly different approach, I assume the GObject is a ControlTerminal, depends on the details of what you are doing. This simply empties the array and puts the GObject into the array. You may add Copy/Paste operation if you want to just duplicate the object instead of moving it.
04-16-2010 09:38 AM
Thanks, i'll give this a shot.
The reason I want to do this is because ive been experimenting with xnodes and what i need to do is create a queue with a maximum length, basically i push something on and something pops off the end if its reached maximum length, otherwise it increases the size. I have everything working, have the template, type propagation, etc, but i just needed to figure out how to change the array type of the internal array which is the queue to match the users data type input.