Well, I didn't know the answer so I tried out a little example with debug just to see the order. 3 objectTypes, 6 objects, 1 family, and a forEach on the family. : capx
The result seems to prove that :
- elements UID in the family is correct
- elements IID in family are not the "family IID", but the different IID of the objects, as if there was 3 pack of items, classed by object type.
So using the IID in your case can be tricky, and using the UID and function instead could help, yes.
Here is a function that could do the trick, simulating a "pick Nth object" for a family. Problem is you have to rewrite it for every family...
<img src="https://photos-3.dropbox.com/t/0/AAAEfxtcRQmfJerPEgeVZvytQb3pJEaZXoQQ7euyTl2Vrw/12/113235847/jpeg/1024x768/3/1372237200/0/2/pickFamily.JPG/SEtxKiIgNsraMnJOeo4vY5ZMEqz69dchdmqkkXFQatI" border="0">