/// <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()); }
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()); }
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(); }
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(); }