revitron.analyze.providers

This submodule is a collection of data providers that are used to extract information from a given Revit model.

Classes:

AbstractDataProvider(config)

The abstract data provider.

ElementAreaProvider(config)

This data provider returns the accumulated area of a set of elements after applying all filters that are defined in the provider configuration.

ElementCountProvider(config)

This data provider returns the count of filtered elements after applying all filters that are defined in the provider configuration.

ElementLengthProvider(config)

This data provider returns the accumulated length of a set of elements after applying all filters that are defined in the provider configuration.

ElementVolumeProvider(config)

This data provider returns the accumulated area of a set of elements after applying all filters that are defined in the provider configuration.

WarningCountProvider(config)

This data provider returns the number of warnings in a model.

class AbstractDataProvider(config)[source]

Bases: object

The abstract data provider. A data provider must implement a run() method that actually defines the extracted data.

Methods:

__init__(config)

Init a new data provider with a given configuration.

run()

The abstract method for data extraction.

Attributes:

dataType

The data type property defines the data type of the provided data in the database.

valueType

The value type property defines the type of the provided data in the database, such as length, area, volume or count.

__init__(config)[source]

Init a new data provider with a given configuration.

Parameters

config (dict) – The data provider configuration

property dataType

The data type property defines the data type of the provided data in the database.

Returns

The data type that is used for provided values in the database

Return type

string

abstract run()[source]

The abstract method for data extraction. This method must be implemented by a data provider.

abstract property valueType

The value type property defines the type of the provided data in the database, such as length, area, volume or count.

Returns

The value type

Return type

string

class ElementAreaProvider(config)[source]

Bases: AbstractDataProvider

This data provider returns the accumulated area of a set of elements after applying all filters that are defined in the provider configuration.

Methods:

__init__(config)

Init a new data provider with a given configuration.

run()

Apply filters and accumulate the area of the filtered elements.

Attributes:

dataType

The area data type is real.

valueType

The value type is area.

__init__(config)

Init a new data provider with a given configuration.

Parameters

config (dict) – The data provider configuration

property dataType

The area data type is real.

Returns

The data type

Return type

string

run()[source]

Apply filters and accumulate the area of the filtered elements.

Returns

The accumulated area

Return type

integer

property valueType

The value type is area.

Returns

The value type

Return type

string

class ElementCountProvider(config)[source]

Bases: AbstractDataProvider

This data provider returns the count of filtered elements after applying all filters that are defined in the provider configuration.

Methods:

__init__(config)

Init a new data provider with a given configuration.

run()

Run the data provider and return the number of filtered elements.

Attributes:

dataType

The data type property defines the data type of the provided data in the database.

valueType

The value type for the counter is count.

__init__(config)

Init a new data provider with a given configuration.

Parameters

config (dict) – The data provider configuration

property dataType

The data type property defines the data type of the provided data in the database.

Returns

The data type that is used for provided values in the database

Return type

string

run()[source]

Run the data provider and return the number of filtered elements.

Returns

The number of filtered elements

Return type

integer

property valueType

The value type for the counter is count.

Returns

The value type

Return type

string

class ElementLengthProvider(config)[source]

Bases: AbstractDataProvider

This data provider returns the accumulated length of a set of elements after applying all filters that are defined in the provider configuration.

Methods:

__init__(config)

Init a new data provider with a given configuration.

run()

Apply filters and accumulate the length of the filtered elements.

Attributes:

dataType

The length data type is real.

valueType

The value type is length.

__init__(config)

Init a new data provider with a given configuration.

Parameters

config (dict) – The data provider configuration

property dataType

The length data type is real.

Returns

The data type

Return type

string

run()[source]

Apply filters and accumulate the length of the filtered elements.

Returns

The accumulated length

Return type

integer

property valueType

The value type is length.

Returns

The value type

Return type

string

class ElementVolumeProvider(config)[source]

Bases: AbstractDataProvider

This data provider returns the accumulated area of a set of elements after applying all filters that are defined in the provider configuration.

Methods:

__init__(config)

Init a new data provider with a given configuration.

run()

Apply filters and accumulate the volume of the filtered elements.

Attributes:

dataType

The volume data type is real.

valueType

The value type is volume.

__init__(config)

Init a new data provider with a given configuration.

Parameters

config (dict) – The data provider configuration

property dataType

The volume data type is real.

Returns

The data type

Return type

string

run()[source]

Apply filters and accumulate the volume of the filtered elements.

Returns

The accumulated area

Return type

integer

property valueType

The value type is volume.

Returns

The value type

Return type

string

class WarningCountProvider(config)[source]

Bases: AbstractDataProvider

This data provider returns the number of warnings in a model.

Methods:

__init__(config)

Init a new data provider with a given configuration.

run()

Get the number of warnings.

Attributes:

dataType

The data type property defines the data type of the provided data in the database.

valueType

The value type is count.

__init__(config)

Init a new data provider with a given configuration.

Parameters

config (dict) – The data provider configuration

property dataType

The data type property defines the data type of the provided data in the database.

Returns

The data type that is used for provided values in the database

Return type

string

run()[source]

Get the number of warnings.

Returns

The number of warnings

Return type

integer

property valueType

The value type is count.

Returns

The value type

Return type

string