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.
|