There are two ways to identify a specific element type:
-
If the purpose is only to confirm that an element is a specific type, e.g. in the rule to attach a recipe to an element, the easiest method is to request the type for comparison, e.g.:
element.type = “Wall”
element.type = “Slab”
-
For both confirming the element type and making calculations, the type can be asserted in the expression. For example, when checking that an element is a wall with a height greater than 2m, the most obvious expression would be:
element.type = “Wall” and element.height > 2
…but the expression for height could also assert that the type is a wall:
wall.height > 2
The effect is the same as checking that the element is wall, and asking for the height of a non-wall in this way yields a zero result.
The full list of supported element types (and their names) can be found in section 7.3, Element Identification.
A name value is available for all object-based (parametric) elements, e.g. Object, Door, Window, Zone etc. and provides the name of the library part. For example, the rule to attached a recipe to every object provided by a manufacturer called “Fixtures4U” could be:
element.name contains “Fixtures4U”
…assuming the library part names all contain the manufacturer name. Or the condition to take a measurement for every zone represented by a stamp starting with the words “Space Planning”:
zone.name startsWith “Space Planning”
The id simply provides whatever text is entered for the element ID. The is most likely to be useful as a rule for attaching recipes or taking measurements rather than calculating quantities, but this depends greatly on office standards, i.e. what information the ID is supposed to contain.
Comments
0 comments
Please sign in to leave a comment.