DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Expand ModelsModels
Collapse DG Kernel ControlDG Kernel Control
Expand API ReferenceAPI Reference
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation LinksHome Page > DG Kernel Control > Interactive Functionality > Overlay Go to ActiveX docs Search Documentation


Overlay Editor

Overlay Editor is a 2D Editor, so it interacts with the end user at runtime to allow direct modification of a 2D Model. Overlays are useful for interactively defining selection areas more cmplex than a rectangle.

Access to a 2D editor is implemented via I2DEditor_DG. See Overlay topic about obtaining this interface.

Call I2DEditor_DG.GetEditableObject() to obtain IEntity_DG of the overlay. Query IModel2d_DG from IEntity_DG of the overlay to access its 2D geometry. Use methods of IModel2d_DG to modify structure of the 2D model and parametrs of its items and elements. More details.

Event Notifcations

To notify the application about different actions by the end user, 2D editors raise DgkMisc events with the DgkMiscEventArgs.eventType parameter set to Event_DG.TwoDimEditor. The DgkMiscEventArgs.param0 member is an integer with value one of EditorEvent_DG:

ID Event Raised
Activated The editor has been activated Always
ModelStructureChanged A new item aded to the 2D model or deleted If context boolean parameter 0 is true. See below
ItemStructureChanged Number of elements in an item has chanded. New element added or deleted If context boolean parameter 1 is true. See below
Closing The editor is about to be closed Always

For performance frequent events ModelStructureChanged and EventItemStructureChanged are not raised by default. They have to be requested with:

Query IContext_DGt from I2DEditor_DG. Call IContext_DG.SetBool(0, true) to request ModelStructureChanged. Call IContext_DG.SetBool(1, true) to request ItemStructureChanged.