Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
For sure, I am probably doing something wrong, but I am facing the following issue with Revit 2023 & 2024:
- Start Revit and create a new project
- Start a transaction (actually a transaction group since I am exporting a physical+analytical model to Revit)
- Create schema (mySchema)
- Export a steel beam (1) and other analytical stuffs
- Set entity to that family instance with that schema
- End transaction
- Everything looks fine
Next:
- Start transaction 2 in the same document
- schema = Schema.Lookup(sameIdThanBefore)
- Call document.EraseSchemaAndAllEntities(schema)
- Export another steel beam (2)
- Set entity to it with "schema"
- End transaction
- I see that beam 2 has its entity but not beam 1 (as I'd expect)
Then, I click "undo" in Revit UI:
- Steel beam 2 has disappeared (as expected) because all stuffs from transaction group 2 has gone
- Entity for beam 1 has disappeared as well. I would expect to see the entity from the first transaction.
- It looks like document.EraseSchemaAndAllEntities is not undoable 🤔?
Any clue on this issue. I have taken a look at the different posts and Jeremmy's blog but I did not find anything that could help me.
Regards
Solved! Go to Solution.