예제 #1
0
            /// <summary>
            /// Returns an array of all group names.
            /// </summary>
            /// <param name="ignoreDeletedGroups">Ignore any groups that were deleted.</param>
            /// <returns>An array if group names if succesful, null if there are no groups.</returns>
            /// <since>5.0</since>
            public string[] GroupNames(bool ignoreDeletedGroups)
            {
                int count = Count;

                if (count < 1)
                {
                    return(null);
                }
                Rhino.Collections.RhinoList <string> names = new 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());
            }
예제 #2
0
        public DocObjects.ObjRef[] Objects()
        {
            int count = ObjectCount;

            if (count < 1)
            {
                return(null);
            }
            Rhino.Collections.RhinoList <DocObjects.ObjRef> objrefs = new Rhino.Collections.RhinoList <Rhino.DocObjects.ObjRef>(count);
            for (int i = 0; i < count; i++)
            {
                DocObjects.ObjRef objref = Object(i);
                objrefs.Add(objref);
            }
            return(objrefs.ToArray());
        }
예제 #3
0
 public DocObjects.ObjRef[] Objects()
 {
   int count = ObjectCount;
   if (count < 1)
     return null;
   Rhino.Collections.RhinoList<DocObjects.ObjRef> objrefs = new Rhino.Collections.RhinoList<Rhino.DocObjects.ObjRef>(count);
   for(int i=0; i<count; i++)
   {
     DocObjects.ObjRef objref = Object(i);
     objrefs.Add(objref);
   }
   return objrefs.ToArray();
 }
예제 #4
0
 public string[] GroupNames( bool ignoreDeletedGroups )
 {
   int count = Count;
   if (count < 1)
     return null;
   Rhino.Collections.RhinoList<string> names = new 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();
 }