Layers Sample
Layers Sample demonstrates programming of
layers and
User Data.
The Application
The form displays relatively large model of a power transformer. Different
objects are arranged in layers according of its purpose and according the
external/internal location. On
All Available layers are listed on load in the "All Layers" list box.
Selecting a layer and clicking the Hide/Show buttons from the Selected Layer
group changes visibility of all objects from the selected layer, thus allowing
to look inside the transformer layer by layer.
On load all objects in the model are listed in the "All Objects" list. When
an object selected in the list, its Layer name and User Data integer are
displayed in the Selected Object group. Both properties can be modified.
Entering a new name for the layer is equivalent to creating a new layer and
assigning the object to it. If the layer name is cleared so it is an empty
string the object is assumed to be assigned to the Default layer.
File menu allows loading any model or saving modified one.
Implementation
Native C++
C#
|