Select nodes

Discussion about scripting with Python
User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Select nodes

Postby Otuama » Wed Jan 18, 2012 6:35 pm

I don't know if I'm being particularly thick but I can't figure out how to select a node.

Can it even be done because I can't find anything in the scripting help?

I've tried:

scene.select ("Node")
scene.select.getObject ("Node")

select ("Node")

etc, etc, etc

-Sean
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd


User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Select nodes

Postby Otuama » Wed Jan 18, 2012 6:40 pm

Ah, you can't (Link).

Can't believe it!!!!
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

et
Posts: 20
Joined: Thu Jun 02, 2011 8:31 am
Contact:

Select nodes

Postby et » Thu Jan 19, 2012 11:57 am

Hi Otuama,

The correct python command to select nodes in RF 2012 is:

scene.selectNodes([Sphere01, Cube01])

cheers
---------------------
NextLimit Team
---------------------

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Select nodes

Postby Otuama » Thu Jan 19, 2012 12:51 pm

Ah, that's good to hear.

I'm using Rf5. This has probably made me realise that I need to upgrade to the learning edition, which I assume will have all the recent updates.

Thanks,

Sean
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

mdonovan
Posts: 121
Joined: Wed Jun 17, 2009 3:59 pm

Select nodes

Postby mdonovan » Mon Feb 13, 2012 6:09 pm

not to state the obvious .. but you can store a node in a variable and use the variable in place of the literal.

GDF = scene.getGridDomain("Grid_Fluid_Domain01")
scene.selectNodes([GDF])

etc.


Return to “Python-Scripting”

Who is online

Users browsing this forum: No registered users and 4 guests