DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


Layers C++ Sample

Layers Sample demonstrates programming of  layers and User Data.

The Application

Go to description

Implementation

LayersDlg::UpdateModelInfo(), which is called on start or load of a new model collects all information about objects in layers in the model and updates both lists. All objects are listed independently of the child/parent hierarchy, which is done with the help of FlatObjectArray  Property of the model accessed via IPropertyArray.

ILayers array queried from IModel allows to list all unique layers in the model. Actual layer name is accessed vial IUserData queried from ISection of the selected object. The same IUserData is used in LayersDlg::OnKillfocusEditLayer() to modify the layer name.

Show/Hide layer operations boil down to ILayers.Set call in LayersDlg::ShowCurrentLayer() function.