Hello again,
i need to have the last added item of a group. Therefore i tried to analyze the way Rhino adds objects to groups and added some points to a group. Then i added some text in the order group_table.GroupMembers(index) returns the group members.
object = rs.GetObject()
groups = rs.ObjectGroups(object)
group_table = rc.RhinoDoc.ActiveDoc.Groups
group_index = group_table.Find(groups[0], True)
group_members = group_table.GroupMembers(group_index)
count = 0
for group_member in group_members:
rs.AddText(str(count),rs.PointCoordinates(group_member),0.005)
count = count + 1
The last item had the index 0. The order was kept but reversed.
I then saved the File and reopened it. Now index 0 was the first item - the order was reversed again.
I am struggling to get my problem solved and would be very glad if someone could help.
Thanks in advance!
Philip