2027 Class
Changes 0
C

ElementSet

Description:
A set that contains element objects.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.APIObject
    Autodesk.Revit.DB.ElementSet
public class ElementSet : APIObject, IEnumerable
ICollection<ElementId> selectedIds = uidoc.Selection.GetElementIds();

string info = "Selected elements:\n";
foreach (ElementId id in selectedIds)
{
    Element elem = document.GetElement(id);
    info += elem.Name + "\n";
}

TaskDialog.Show("Revit",info);
Name Return Type Description Inherited From
C ElementSet() None Initializes a new instance of the ElementSet class
Name Return Type Description Inherited From
M Clear() None Removes every item element the set, rendering it empty.
M Contains(Element) Boolean Tests for the existence of an element within the set.
M Dispose() None Causes the object to release immediately any resources it may be utilizing. (Inherited from APIObject ) APIObject
M Equals None Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
M Erase(Element) Int32 Removes a specified element from the set.
M ForwardIterator() ElementSetIterator Retrieve a forward moving iterator to the set.
M GetEnumerator() IEnumerator Retrieve a forward moving iterator to the set.
M GetHashCode None Serves as the default hash function. (Inherited from Object ) Object
M GetType None Gets the Type of the current instance. (Inherited from Object ) Object
M Insert(Element) Boolean Insert the specified element into the set.
M ReverseIterator() ElementSetIterator Retrieve a backward moving iterator to the set.
M ToString None Returns a string that represents the current object. (Inherited from Object ) Object
Name Return Type Description Inherited From
P IsEmpty bool Test to see if the set is empty.
P IsReadOnly bool Identifies if the object is read-only or modifiable. (Inherited from APIObject ) APIObject
P Size int Returns the number of elements that are in the set.