get_all_elements_with_attrib

compas_cadwork.utilities.get_all_elements_with_attrib(attrib_number, attrib_value=None)[source]

Returns a generator containing all elements with the given user attribute set to the given value.

Parameters:
attrib_numberint

The user attribute number to filter by.

attrib_valuestr, optional

The value the user attribute should have.

Returns:
generator(compas_cadwork.datamodel.Element)

Generator of elements