PDA

View Full Version : Create array from string


fido972
07-17-2009, 03:49 PM
Hi,
I have a problem i want to create arrays from objects Name?
Do someone have a solution?

I wanna creates arrays from a for boucle.

Like
for i = 1 to 10 do

i value as array?


Thanks for helping.

Piflik
07-17-2009, 04:31 PM
This should store the names of the selected objects into an array...

object_Names = for i in selection collect i.name

fido972
07-17-2009, 04:42 PM
Thanks Piflik but it's not really what i want.

If i have an object named : "Mum" i wanna create an array from this name as a string like : Mum = #() but taken directly from the object name.

PiXeL_MoNKeY
07-17-2009, 05:13 PM
Place it in an execute statement:execute (obj.name+" = #()")-Eric

fido972
07-17-2009, 05:55 PM
Thanks PiXeL_MoNKeY it works fine.

CGTalk Moderation
07-17-2009, 05:55 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.