ICE fill an array with random numbers

190 views
Skip to first unread message

Chris Marshall

unread,
Jul 19, 2012, 5:34:19 AM7/19/12
to soft...@listproc.autodesk.com
Hello All,
I have a couple of Array questions.
I create an array of size 100 using Build Array from Constant, how can I fill that with random numbers?
With array nodes such as Push on Array, Insert in Array etc, where does the output of those go? I can't plug them into a set data node because it throws up a context error, so why isn't the output divot an Execute port? Or put another way, how do you use Push on Array etc etc?

Thanks
Chris

Vincent Ullmann

unread,
Jul 19, 2012, 5:46:53 AM7/19/12
to soft...@listproc.autodesk.com
For the randomArray and the Set-In-Array Questions see my Screenshot
(Push on Array works the same way like Set-In-Array)

But make sure your Array is big enough. If you want to set Value number 3, your array should have at least 4 Entries. (Use the Resize Array for that)
Unbenannt-2.jpg

Chris Marshall

unread,
Jul 19, 2012, 5:51:23 AM7/19/12
to soft...@listproc.autodesk.com
OK thanks. I had the Set in Array the same as this, but I was getting
a context error. Will check out why now.

Cheers
--

Chris Marshall
Mint Motion Limited
029 2002 5762
07730 533 115
www.mintmotion.co.uk

Peter Agg

unread,
Jul 19, 2012, 5:51:45 AM7/19/12
to soft...@listproc.autodesk.com
The random array one is pretty easy. You can just use the sub-Index as an ID.

Not sure where you're running into issues with the Push/Insert stuff, but I did an example anyway.
random_arr.png
random_arr_PushInsert.png

Chris Marshall

unread,
Jul 19, 2012, 5:59:49 AM7/19/12
to soft...@listproc.autodesk.com
Thanks. Yes I don't know why I was having the problem with the
Push/Insert etc. Seems to be ok now.

Cheers
Reply all
Reply to author
Forward
0 new messages