Base Object Fields
All Speckle objects inherit fromBase and have these core fields:
id
The id is a content-based hash that uniquely identifies the object’s data. If two objects have the same content, they have the same id. This enables efficient deduplication and version control.
speckle_type
The speckle_type identifies what kind of object this is. Examples:
"Objects.Geometry.Point""Objects.Geometry.Mesh""Objects.Data.DataObject""Objects.Data.DataObject:Objects.Data.RevitObject"
applicationId
The applicationId is the identifier from the source application (e.g., a Revit element ID, a Rhino object GUID). This is how proxies reference objects.
DataObject Structure
DataObject is the most common object type for BIM elements. It extendsBase with these fields:
name
A human-readable name for the object (e.g., “Basic Wall - 200mm”, “Column A1”).
properties
A dictionary of key-value pairs containing all metadata about the object. This is where connector-specific data lives:
- Revit: Instance parameters, type parameters, material quantities
- Rhino: User strings, user dictionaries
- AutoCAD: Extension dictionaries, XData
properties dictionary can contain nested structures, but the values are always JSON-serializable.
displayValue
An array of geometry objects that represent the visual appearance of this DataObject. Geometry objects (Point, Line, Mesh, Brep, etc.) are stored here, not as direct children.
units
The unit system used for this object’s geometry (e.g., "meters", "feet", "millimeters").
Geometry Object Structure
Geometry objects are simpler—they represent pure geometric primitives:properties or displayValue—they are the geometry themselves.
Instance Structure
Instance objects represent block references or instanced geometry:definitionId references a Definition proxy that contains the actual geometry.
Global Invariants
These rules apply to all objects:-
No nested DataObjects - DataObjects cannot contain other DataObjects as direct children. Use
displayValuefor geometry, and use proxies for relationships. -
Geometry always in
displayValue- All visual geometry for a DataObject must be in thedisplayValuearray, not as direct properties. -
Objects always have core fields - Every object has
id,speckle_type,applicationId,units, and (for DataObjects)properties. -
Proxies reference by
applicationId- Proxies link to objects usingapplicationId, notid. - Hierarchy is Speckle-imposed - The collection hierarchy is created by Speckle connectors, not necessarily matching the source application’s structure exactly.
Why can't DataObjects contain other DataObjects?
Why can't DataObjects contain other DataObjects?
This design prevents deep nesting and keeps the data model flat and predictable. If you need to represent a hierarchical relationship (like a wall containing studs), use:
- Separate DataObjects in collections
- Proxies to encode the relationship
- Properties to store references
What's the difference between `id` and `applicationId`?
What's the difference between `id` and `applicationId`?
id: Speckle’s content-based hash. Same content = sameid. Used for deduplication and versioning.applicationId: The source application’s identifier (Revit element ID, Rhino GUID, etc.). Used for references and proxies. Can change if the object is modified in the source application.
id to track objects across versions. You use applicationId to link objects to their source and to resolve proxy references.Connector-Specific Extensions
Some connectors extend DataObject with additional fields. For example:- RevitObject: Adds
type,family,category,level,location - NavisworksObject: Minimal extension (just inherits DataObject)
- Civil3dObject: Adds
baseCurves
Example: Complete DataObject
Here’s a realistic example of a Revit wall object:Next Steps
- Geometry Model - How geometry objects are structured
- Proxy Model - How proxies encode relationships
- Traversal Recipes - How to navigate and process objects