Bexel Manager API Documentation
Bexel.Api.ReadOnlyElementCollection< TElement > Class Template Referenceabstract

More...

Inheritance diagram for Bexel.Api.ReadOnlyElementCollection< TElement >:
Bexel.Api.IReadOnlyElementCollection< TElement > IReadOnlyCollection Bexel.Api.BuildingElements Bexel.Api.BuildingStoreyElements Bexel.Api.CategoryElements Bexel.Api.ElementSourceElements Bexel.Api.ElementSystemElements Bexel.Api.FamilyElements Bexel.Api.ProjectElements Bexel.Api.SelectedElementsCollection Bexel.Api.SelectionSets.SelectionSetElements Bexel.Api.SelectionSets.SelectionSetFolderElements

Public Member Functions

TElement GetElementByID (ElementID id)
 Retrieves the element with the specified ID. More...
 
TElement GetElementByID (int internalID)
 Retrieves the element with the specified internal ID. More...
 
TElement GetElementByID (string uniqueID)
 Retrieves the element with the specified unique ID. More...
 
TElement GetElementByID (Guid uniqueID)
 Retrieves the element with the specified unique ID. More...
 
IEnumerable< TElement > GetElementsByID (string uniqueID)
 Retrieves the elements with the specified unique ID. More...
 
IEnumerable< TElement > GetElementsByID (Guid uniqueID)
 Retrieves the elements with the specified unique ID. More...
 
IEnumerator< TElement > GetEnumerator ()
 
bool ContainsKey (ElementID id)
 Determines whether the collection contains the element with the specified ID. More...
 
bool ContainsKey (int internalID)
 Determines whether the collection contains the element with the specified internal ID. More...
 

Protected Member Functions

abstract TElement Create (ElementRef elementRef)
 
override Element Create (ElementRef elementRef)
 

Properties

abstract Project Project [get]
 
abstract IReadOnlyDictionary< int, ElementRef > ElementCollectionRef [get]
 
int Count [get]
 
TElement this[ElementID id] [get]
 
TElement this[int internalID] [get]
 
- Properties inherited from Bexel.Api.IReadOnlyElementCollection< TElement >
TElement this[ElementID id] [get]
 Retrieves the element with the specified ID. More...
 
TElement this[int internalID] [get]
 Retrieves the element with the specified internal ID. More...
 

Detailed Description

Type Constraints
TElement :Element 

Member Function Documentation

◆ ContainsKey() [1/2]

bool Bexel.Api.ReadOnlyElementCollection< TElement >.ContainsKey ( ElementID  id)

Determines whether the collection contains the element with the specified ID.

Parameters
idID of the element.
Returns
True if element with the specified ID exists, False otherwise.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.

◆ ContainsKey() [2/2]

bool Bexel.Api.ReadOnlyElementCollection< TElement >.ContainsKey ( int  internalID)

Determines whether the collection contains the element with the specified internal ID.

Parameters
internalIDInternal ID of the element.
Returns
True if element with the specified internal ID exists, False otherwise.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.

◆ GetElementByID() [1/4]

TElement Bexel.Api.ReadOnlyElementCollection< TElement >.GetElementByID ( ElementID  id)

Retrieves the element with the specified ID.

Parameters
idID of the element.
Returns
An element with the specified ID, null if no such element exists within the collection.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.

◆ GetElementByID() [2/4]

TElement Bexel.Api.ReadOnlyElementCollection< TElement >.GetElementByID ( int  internalID)

Retrieves the element with the specified internal ID.

Parameters
internalIDInternal ID of the element.
Returns
An element with the specified internal ID, null if no such element exists within the collection.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.

◆ GetElementByID() [3/4]

TElement Bexel.Api.ReadOnlyElementCollection< TElement >.GetElementByID ( string  uniqueID)

Retrieves the element with the specified unique ID.

Parameters
uniqueIDUnique ID of the element.
Returns
An element with the specified unique ID, null if no such element exists within the collection.

If multiple elements with the same unique ID exist, the first element will be returned.

Exceptions
System.ArgumentNullExceptionuniqueID is null.
System.FormatExceptionuniqueID is not a valid GUID format.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.

◆ GetElementByID() [4/4]

TElement Bexel.Api.ReadOnlyElementCollection< TElement >.GetElementByID ( Guid  uniqueID)

Retrieves the element with the specified unique ID.

Parameters
uniqueIDUnique ID of the element.
Returns
An element with the specified unique ID, null if no such element exists within the collection.

If multiple elements with the same unique ID exist, the first element will be returned.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.

◆ GetElementsByID() [1/2]

IEnumerable<TElement> Bexel.Api.ReadOnlyElementCollection< TElement >.GetElementsByID ( string  uniqueID)

Retrieves the elements with the specified unique ID.

Parameters
uniqueIDUnique ID of the element.
Returns
All elements with the specified unique ID, empty collection if no such elements exist within the collection.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.

◆ GetElementsByID() [2/2]

IEnumerable<TElement> Bexel.Api.ReadOnlyElementCollection< TElement >.GetElementsByID ( Guid  uniqueID)

Retrieves the elements with the specified unique ID.

Parameters
uniqueIDUnique ID of the element.
Returns
All elements with the specified unique ID, empty collection if no such elements exist within the collection.

Implements Bexel.Api.IReadOnlyElementCollection< TElement >.