@@ -0,0 +1,1189 @@
+#**********************************************************************************************#%0A#********* Return the top most group name of an object ****************************************#%0A#********* by Djordje Spasic ******************************************************************#%0A#********* issworld2000@yahoo.com 6-May-2014 **************************************************#%0A%0A%22%22%22%0AThis small function replicates the %22ObjectTopGroup%22 RhinoScript function, which still hasn't been implemented %0Ainto PythonScript.%0AReturns the top most group name that an object is assigned.  This function primarily applies to objects that are %0Amembers of nested groups.%0A%22%22%22%0A%0Aimport rhinoscriptsyntax as rs%0Aimport scriptcontext as sc%0A%0Adef objectTopGroup(_id):%0A    groupNames = sc.doc.Groups.GroupNames(False)%0A    groupName = False%0A    for i in range(rs.GroupCount()):%0A        groupRO = sc.doc.Groups.GroupMembers(i)%0A        for ele in groupRO:%0A            if rs.coercerhinoobject(ele).Id == _id:%0A                groupName = groupNames%5Bi%5D%0A    if groupName:%0A        print groupName%0A    else:%0A        print %22The element you chose does not belong to any group%22%0A%0Aid = rs.GetObject()%0AobjectTopGroup(id)%0A

Create objectTopGroup.py