Goal
Compare two published versions of the same model and report which elements were added, removed, or changed — a common BIM manager and coordination workflow.What you will build
A script that loads two versions, indexes elements byapplicationId (or name as fallback), and prints counts of added, removed, and unchanged objects.
When to use this
Use this after design iterations, connector republishes, or milestone reviews when you need to know what changed between two Speckle versions. Avoid this when you only need a single-version health check — see Build your first model analysis tool.Recommended approach
- Load both versions with
Receive2using each version’sreferencedObjectid Flatten()each graph- Index by
applicationIdwhen present (stable host-app id from connectors) - Fall back to
nameonly when ids are missing — names can collide - Compare key sets and optionally property hashes
Complete example
applicationId is set by connectors to the stable id from the host application (for example a Revit element id). Without it, compare by name with caution — duplicate names are common in large models.How it works
Each version points at a root object id.Receive2 downloads two separate object graphs. Indexing by applicationId lets you match the same physical element across publishes.
For deeper diffs, compare specific properties keys (category, level, fire rating) or serialize selected properties to a string hash.
Common mistakes
| Mistake | Fix |
|---|---|
| Comparing versions from different models | Use the same modelId, two versionId values |
Using only object id (content hash) | Host applicationId tracks the same element across edits |
| Expecting geometry diff | Start with property and presence diff |
| Loading full graphs repeatedly in a loop | Receive each version once, index, then compare |
Next steps
Send analysis results back
Publish a change summary to Speckle
Find objects by property
Filter and index patterns
BIM data patterns
applicationId and properties