Python and Families

For questions about using Classic.

Post » Thu Aug 11, 2011 10:45 pm

When you use families in python, how do you make it acknowledge all families instead of just the first? I've already figured out you can make python use all instances of an object with "for n in range(Obj.Count): Obj[n]" but it'll only use the first family.

I also did a bit of testing earlier with lucid's py picker plugin and found the instance numbers reset with each object in the family.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Thu Aug 11, 2011 11:04 pm

If you use "len(Obj)" instead of "Obj.count" it will work.
ex:
"for n in range(len(Obj)): Obj[n]"
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Fri Aug 12, 2011 12:34 am

Thanks, that worked perfectly
B
51
S
10
G
7
Posts: 184
Reputation: 6,825


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests