How to Get All Changed Elements, Including Unsaved Changes, Using Document.GetChangedElements()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I'm currently using Document.GetChangedElements(baseVersionId) to retrieve all elements that have changed since an earlier version of the document. This works well for identifying changes where Revit has created a new version ID.
However, I've noticed that when changes are made without Revit generating a new version ID, those modifications are not included in the results of GetChangedElements().
Is there a way to retrieve all element_ids that have changed since the last version, including those unsaved changes? Or is there a way to use GetChangedElements() so that it captures all changes, even if they don’t correspond to a new version ID?
I came across this question where @jeremy_tammik provided insight on obtaining document changes compared to an earlier version. I was wondering if there’s a similar or complementary approach to handle this scenario without saved changes.
Thanks for your help!
Helpful links:
API: Document.GetChangedElements(): https://www.revitapidocs.com/2024/0799eb9e-5ce8-2668-eb3d-aecfd121b2d6.htm