Element
|
A set that contains element objects.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
The ElementSet type exposes the following members.
| Name | Description | |
|---|---|---|
|
|
ElementSet | Initializes a new instance of the ElementSet class |
| Name | Description | |
|---|---|---|
|
|
IsEmpty | Test to see if the set is empty. |
|
|
IsReadOnly |
Identifies if the object is read-only or modifiable.
(Inherited from APIObject ) |
|
|
Size | Returns the number of elements that are in the set. |
| Name | Description | |
|---|---|---|
|
|
Clear | Removes every item element the set, rendering it empty. |
|
|
Contains | Tests for the existence of an element within the set. |
|
|
Dispose |
Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject ) |
|
|
Equals |
Determines whether the specified object is equal to the current object.
(Inherited from Object ) |
|
|
Erase | Removes a specified element from the set. |
|
|
ForwardIterator | Retrieve a forward moving iterator to the set. |
|
|
GetEnumerator | Retrieve a forward moving iterator to the set. |
|
|
GetHashCode |
Serves as the default hash function.
(Inherited from Object ) |
|
|
GetType |
Gets the
Type
of the current instance.
(Inherited from Object ) |
|
|
Insert | Insert the specified element into the set. |
|
|
ReverseIterator | Retrieve a backward moving iterator to the set. |
|
|
ToString |
Returns a string that represents the current object.
(Inherited from Object ) |
C#
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);