ElementSet
Description:
A set that contains element objects.
A set that contains element objects.
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 |
|---|---|---|---|
| ElementSet() | ElementSet | Initializes a new instance of the ElementSet class |
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| Clear() | None | Removes every item element the set, rendering it empty. | |
| Contains(Element) | Boolean | Tests for the existence of an element within the set. | |
| Dispose() | None | Causes the object to release immediately any resources it may be utilizing. (Inherited from APIObject ) | APIObject |
| Equals | None | Determines whether the specified object is equal to the current object. (Inherited from Object ) | Object |
| Erase(Element) | Int32 | Removes a specified element from the set. | |
| ForwardIterator() | ElementSetIterator | Retrieve a forward moving iterator to the set. | |
| GetEnumerator() | IEnumerator | Retrieve a forward moving iterator to the set. | |
| GetHashCode | None | Serves as the default hash function. (Inherited from Object ) | Object |
| GetType | None | Gets the Type of the current instance. (Inherited from Object ) | Object |
| Insert(Element) | Boolean | Insert the specified element into the set. | |
| ReverseIterator() | ElementSetIterator | Retrieve a backward moving iterator to the set. | |
| ToString | None | Returns a string that represents the current object. (Inherited from Object ) | Object |
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| IsEmpty | bool | Test to see if the set is empty. | |
| IsReadOnly | bool | Identifies if the object is read-only or modifiable. (Inherited from APIObject ) | APIObject |
| Size | int | Returns the number of elements that are in the set. |
No comments yet. Start the discussion.
Loading…