/// <since>5.0</since>
            public string[] GroupNames(bool ignoreDeletedGroups)
            {
                int count = Count;

                if (count < 1)
                {
                    return(null);
                }
                Pixel.Rhino.Collections.RhinoList <string> names = new Pixel.Rhino.Collections.RhinoList <string>(count);
                for (int i = 0; i < count; i++)
                {
                    if (ignoreDeletedGroups && IsDeleted(i))
                    {
                        continue;
                    }
                    string name = GroupName(i);
                    if (!string.IsNullOrEmpty(name))
                    {
                        names.Add(name);
                    }
                }
                if (names.Count < 1)
                {
                    return(null);
                }
                return(names.ToArray());
            }
 /// <summary>
 /// Adds a list of objects to an existing group.
 /// </summary>
 /// <param name="groupIndex">The group index value.</param>
 /// <param name="objectIds">An array, a list or any enumerable set of IDs to objects.</param>
 /// <returns>true if at least an operation was successful.</returns>
 /// <since>5.0</since>
 public bool AddToGroup(int groupIndex, System.Collections.Generic.IEnumerable <Guid> objectIds)
 {
     if (null == objectIds)
     {
         return(false);
     }
     Pixel.Rhino.Collections.RhinoList <Guid> ids = new Pixel.Rhino.Collections.RhinoList <Guid>();
     foreach (Guid id in objectIds)
     {
         ids.Add(id);
     }
     if (ids.Count < 1)
     {
         return(false);
     }
     return(UnsafeNativeMethods.CRhinoGroupTable_AddToGroup(m_doc.RuntimeSerialNumber, groupIndex, ids.Count, ids.m_items));
 }
 /// <summary>
 /// Adds a new group to the group table with a set of objects.
 /// </summary>
 /// <param name="groupName">Name of new group.</param>
 /// <param name="objectIds">An array, a list or any enumerable set of object IDs.</param>
 /// <returns>
 /// &gt;=0 index of new group.
 /// <para>-1 group not added because a group with that name already exists.</para>
 /// </returns>
 /// <remarks>
 /// In some cases, calling Add() can cause the group indices to become invalid.
 /// </remarks>
 /// <since>5.0</since>
 public int Add(string groupName, System.Collections.Generic.IEnumerable <Guid> objectIds)
 {
     if (null == objectIds)
     {
         return(Add(groupName));
     }
     Pixel.Rhino.Collections.RhinoList <Guid> ids = new Pixel.Rhino.Collections.RhinoList <Guid>();
     foreach (Guid id in objectIds)
     {
         ids.Add(id);
     }
     if (ids.Count < 1)
     {
         return(Add(groupName));
     }
     return(UnsafeNativeMethods.CRhinoGroupTable_Add(m_doc.RuntimeSerialNumber, groupName, ids.Count, ids.m_items));
 }