Notifications
Clear all

[Closed] Create array from string

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.

4 Replies

This should store the names of the selected objects into an array…

object_Names = for i in selection collect i.name

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.

Place it in an execute statement:

execute (obj.name+" = #()")

-Eric

Thanks PiXeL_MoNKeY it works fine.