KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > Data > User Data > ILayers
ILayers Interface

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.