PIAttributePath#
typedef PIAttributePath = List<dynamic>
A path defined as a list of tokens where each token is either a string or an integer.
Token Types:#
- String tokens: Reference either an attribute name or a select's chosen type
- Integer tokens: Always reference an index into an aggregate (list, array, etc.)
Path Navigation:#
Provides a simple yet powerful way to address attribute locations within composed instances. Path navigation is not bounded to a single instance—it may cross instance boundaries and traverse multiple instances within a model.
An attribute value is addressable if it can be reached by valid path traversal.
Example: Accessing IfcBeam placement coordinates where starting point is#
IfcBeam instance.
Path Definition:
final path = [
'ObjectPlacement', // Attribute name → IfcLocalPlacement instance
'RelativePlacement', // Attribute name → IfcAxis2Placement select
'IfcAxis2Placement3D', // Select type choice → IfcAxis2Placement3D instance
'Location', // Attribute name → IfcCartesianPoint instance
'Coordinates', // Attribute name → LIST [1:3] OF REAL
0 // Array index → First coordinate (x-value)
];
Navigation Breakdown:
- Start at
IfcBeaminstance - Traverse to
ObjectPlacementattribute (→IfcLocalPlacement) - Traverse to
RelativePlacementattribute (→IfcAxis2PlacementSELECT) - Choose
IfcAxis2Placement3Dfrom the SELECT - Traverse to
Locationattribute (→IfcCartesianPoint) - Traverse to
Coordinatesattribute (→LIST OF REAL) - Access index
[0]for x-coordinate
Key Advantages:#
- Universal addressing: Access any attribute in any composed instance
- Cross-instance navigation: Traverse multiple instance boundaries seamlessly
- Simple syntax: Intuitive list-based construction
- Batch operations: Enable complex data manipulation through paths
Performance Characteristics:#
- Highly efficient: Path traversal is the most efficient method for accessing composed attributes due to memory locality and optimized internal representation
- In-situ updates: Simple fixed-size types (int, double, bool) are updated directly in the underlying flat buffer without copying
- Instance boundary cost: The only performance cost occurs when crossing instance boundaries (reference resolution), but composed attribute traversal within the same instance is extremely fast
Important Notes:#
- The first token must always be a string (attribute name)
- Paths crossing instance boundaries require
resolveRef: truein access methods - Invalid paths (non-existent attributes, out-of-bounds indices) will result in errors
- Composed attribute access is optimized via flat buffer memory layout
