Attributes
Direct IFC attributes — attribute.Name and the other schema attributes, the wildcard, the name/type/value fields, references to other objects, and attribute.meta.
An attribute is a direct field of the IFC entity: Name, Description, GlobalId, ObjectType, Tag, PredefinedType, LongName (spaces), Elevation (storeys), and so on, exactly as the IFC schema names them.
attribute.Name#
attribute.<Name> reads one attribute. Names are case-sensitive and never quoted (they contain no characters that need quoting); an unknown name is a validation warning and fails at run time.
GET qid, attribute.Name, attribute.GlobalId, attribute.ObjectType WHERE type = IFCWALLGET qid, attribute.Name WHERE type = IFCSPACE AND attribute.LongName STARTS_WITH "Living"In WHERE, the string comparators of where#strings apply to string attributes, the numeric ones to numbers such as attribute.Elevation; a bare attribute.Description selects objects that have a description.
Wildcard#
attribute.* returns every attribute of the object that has a value.
GET attribute.* WHERE attribute.GlobalId = "25xnmjtXDBEeYnceWKw7hY"Fields#
An attribute value in the result is an object with name, type (the value's basic type), value and classType (the IFC type of the attribute, such as IfcLabel). The fields can be addressed in the query: attribute.Name.value, attribute.Name.type, attribute.Name.name, attribute.Name.*; attribute.*.value applies a field to every attribute. Grouping and ordering on attribute.Name.value is the explicit form of grouping on the value.
GET attribute.ObjectType.value, COUNT(qid) WHERE type = IFCSPACE GROUP BY attribute.ObjectType.valueReferences#
An attribute that points at another entity (ObjectPlacement, Representation, OwnerHistory) has type: "REFERENCE" and the referenced object's qid as its value. Related objects are reached through the relations of Sub-features and relations, not through these attributes.
Attributes of related objects#
Prefix the attribute with a relation to read it from a related object: buildingStorey.attribute.Name, typeObject.attribute.Name, space.attribute.LongName, parent.attribute.Name.
Origin#
An attribute the object inherits from its type object carries origin: "type" in the result; see type-objects#merging.
attribute.meta#
attribute.meta lists which attributes exist instead of their values; GET attribute.meta, COUNT(qid) GROUP BY attribute.meta surveys the attributes of a selection. It is selectable only (Meta features).
Used in#
- Your first query — reading names.
- Filtering with WHERE — string tests on attributes.