GraphicalEditingScope Class

Represents a period of time within an interactive editing session during which the geometry of elements being displayed in one or more Viewports is being modified. Outside of such a scope, whenever the geometry within a GeometricModel changes new Tiles must be generated to reflect those changes in a viewport. Regenerating entire tiles each time individual elements change can be time-consuming, which may introduce an unacceptable delay between making a modification and seeing its result on the screen.

Within the context of a graphical editing scope, no new tiles are generated. Instead, the geometry for any deleted or modified elements is hidden in the tile graphics, and additional temporary graphics are displayed for any newly-inserted or modified elements. Only when the scope exits are new tiles produced.

The application decides when to enter and exit a graphical editing scope. A single interactive editing session may involve any number of editing scopes. Typically, applications will enter a new editing scope (after first exiting a previous scope, if one exists):

  • When switching from a non-graphical workflow to one that involves editing geometry; or
  • When changing which geometric model is being edited; or
  • After performing an operation that creates or modifies a "large" number (perhaps hundreds?) of elements.

An application should typically exit any graphical editing scope before:

  • Pulling changesets; or
  • Switching from a graphical editing workflow to some non-graphical workflow.

Graphical editing scopes are only supported for BriefcaseConnections opened in read-write mode that contain version 1.0.11 or newer of the BisCore schema.

@see - enterEditingScope to create a scope for a briefcase.

  • editingScope to obtain a briefcase's current scope.
  • exit to terminate a scope.

Extends

Implements

  • EditingScopeNotifications

Methods

Name Description
exit(): Promise<void> Exits this editing scope.  
getGeometryChanges(): Iterable<ModelGeometryChanges, any, any> Obtain all geometric changes to models accumulated within this scope.  
getGeometryChangesForModel(modelId: string): undefined | Iterable<ElementGeometryChange, any, any> Obtain all geometric changes to elements within the specified model accumulated within this scope.  

Inherited methods

Name Inherited from Description
registerImpl(): RemoveFunction Inherited BriefcaseNotificationHandler  
register(): RemoveFunction Static Inherited BriefcaseNotificationHandler Register this class as the handler for notifications on its channel.

Properties

Name Type Description
briefcaseChannelName Accessor ReadOnly "itwinjs-core/editing-scope"    
iModel Readonly BriefcaseConnection The connection to the iModel being edited.  
onEnter Static Readonly BeEvent<(scope: GraphicalEditingScope) => void> Event raised when a new scope is created for any BriefcaseConnection.  
onExited Readonly BeEvent<(scope: GraphicalEditingScope) => void> Event raised when this scope has exited.  
onExiting Readonly BeEvent<(scope: GraphicalEditingScope) => void> Event raised when this scope is about to exit.  
onGeometryChanges Readonly BeEvent<(changes: Iterable<ModelGeometryChanges, any, any>, scope: GraphicalEditingScope) => void> Event raised after geometric changes are written to the iModel.  

Inherited properties

Name Type Inherited from Description
channelName Accessor Inherited ReadOnly string BriefcaseNotificationHandler All subclasses must implement this method to specify their response channel name.

Defined in

Last Updated: 14 November, 2024