How to check if a group has been deleted?

Hi @Gijs, for the moment you might check the groups object count eg:

if scriptcontext.doc.Groups.GroupObjectCount(group_index) == 0:
    is_deleted = True
else:
    is_deleted = False

@dale, imho this should be flagged as a bug which has been in Rhino 5 as well, IsDeleted should work. Since working with indices is discouraged i tried to iterate the grouptable and use FindId instead:

import scriptcontext

def DoSomething():
    for group in scriptcontext.doc.Groups:
        rc = scriptcontext.doc.Groups.FindId(group.Id)
        print rc
        
DoSomething()

but it does list the deleted groups too. Btw. FindId is missing in the RhinoCommon docs ?!

_
c.