Guidance in using the Editing Scope #7043
Replies: 2 comments 1 reply
-
I would be interested to know what results you observe if you check that property before exiting the scope. I'd also be interested to see the webpacked (or otherwise bundled-for-production) JavaScript corresponding to the TypeScript snippet you posted. Bundlers do "optimizations" around property getters, where they assume repeated calls to a getter (even after an
At the end of the day we have to leave it up to the app to decide when it's an appropriate time to enter or exit an editing scope. |
Beta Was this translation helpful? Give feedback.
-
Our current implementation for entering and exiting the editing scope is based on view events.
When the onChangeView() event fires we change the editing scope. For example, when switching between a 3d and a 2d view, we enable (exit/enter) the Editing Scope.
We regularly see, "Error: Cannot exit editing scope after it is disconnected from the iModel", when switching between views or frontstages.
exit
the editing scope more than once)We noticed there is an
internal
property isDisposed that we could potentially use to solve our issue. Are there plans to make thatpublic
at any point?Mainly, we want to enable (exit/enter) the editing scope when switching between our (potentially many) geometric models.
Is there a recommended event we should exit/enter the editing scope? Or maybe we should manually handle this ourselves when switching between our geometric models?
Here is the code for our current implementation for enabling the editing scope:
Versions:
Beta Was this translation helpful? Give feedback.
All reactions