ScriptSpot

Forum topic · General Scripting

How do we choose the name of the object that ascona?

By yunusbbayram · 2011-09-07

Description

 

 <code>

 for i in 1 to objects.count do

if objects[i].name=="askona" do

select $objects[objects[i].name:"askona"] 

 </ code > ?  How do we choose the name of the object that ascona?

 

Comments (2)

there many ways

Anubis · 2011-09-07

for example:

for obj in objects where obj.name == "askona" do select obj

will end with Only one, so if there objects with duplicated names, you can use SelectMore instead of Select:

for obj in objects where obj.name == "askona" do selectMore obj

also GetNodeByName is a bit more faster:

obj = GetNodeByName "askona"
if isValidNode obj do select obj

cheers!

yunusbbayram · 2011-09-08

Thanks anubis