Python and Families

For questions about using Classic.

Post » Fri Feb 08, 2013 4:57 pm

How do I make a loop in python that iterates through all objects in a family? I can't find any reference to families in any of the objects in the list on the right.
B
4
G
3
Posts: 39
Reputation: 978

Post » Fri Feb 08, 2013 7:46 pm

For a family named Blue:
[code]for obj in Blue:
   obj.angle+=45[/code]
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Fri Feb 08, 2013 8:07 pm

That works perfectly. Thank you

The next question is, of course, why are families not shown in the Python editor autocomplete feature?
B
4
G
3
Posts: 39
Reputation: 978

Post » Fri Feb 08, 2013 8:53 pm

I'm not positive but access to families was added after the editor was made. Much like behavior access from python.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests