DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Expand ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Collapse ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > Model > User Data > ILayers Search Documentation


ILayers Interface

Set
Get
GetCount
EnumLayers
GetLayerItems

This interface gives access to the set of layers in the model. It cam be queried from the relevant IModel interface.

See also Interface List


HRESULT Set(char* name, int value);

Parameters

name - [in] name of a layer

value - [in] 0 to make the layer invisible. 1 to make the layer visible

Return Values

S_OK in case of success.
 
Remarks:

The methods hides or shows all objects in the model with


HRESULT Get(char* name, VARIANT_BOOL * all, int* value)

Parameters

name - [in] name of a layer

all - [out] Returned value. If it is set to true. The value is the same for all objects in the layer

value - [out] The returned visibility flag.

Return Values

S_OK in case of success.
 
Remarks:

For the layer name  the method returns true in value variable if the objects are visible. When all is true and returned value is not zero (true) true means that all objects in the layer are visible otherwise some are not visible.

When all is false and returned value is not zero (true) it means that some objects in the layer are visible.


HRESULT GetCount(char* name, int* count)

Parameters

name - [in] name of a layer

count - [out] the returned count of objects in the layer

Return Values

S_OK in case of success.
 
Remarks:

The method returns count of objects in the model, which have layer name set to name


HRESULT EnumLayers(IData** layers)

Parameters

layers - [out, retval] the returned IData reference. See remarks.

Return Values

S_OK in case of success.
 
Remarks:

During the call to this method a new data table, containing array of strings is created. Its IData interface is returned as a result. Each row of the data table consists of a single field layer name. Size of the array can be obtained from the GetCount method above. To obtain name of the i-th layer call layers.GetStringAt(i, 0).


HRESULT GetLayerItems(char* layer, IArray** items)

Parameters

layer - [in] name of a layer

items - [out] the returned IArray reference for the array of objects, which belong to the layer

Return Values

S_OK in case of success.
 
Remarks:

The method returns array of IItem interfaces, implemented by items, which belong to the layer.