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 Links
IDictionary_KC Interface

IDictionary_KC Interface

GetParamCount
GetParamName
GetParamDescription
GetParamType
GetInt
SetInt
GetDouble
SetDouble
GetBool
SetBool
GetString
SetString
Get
Set
GetInterface
SetInterface

Dictionalry is an  array of named parameters (properties) of different types. It is used as a context for an operation or gives access to an object when it is not known in advance how many parameters (properties) will be required.

Initially dictionary was implemented to pass new parameters to IBoolSectionEx.Execute3() as Boolean operations require many parameters and the  set is likely to be expanded in the future

Although IDictionary_KC allows modification of parameters it does not allow changing its structure, namely add/remove parameters or change its types. Structure of a dictionalry depends on and is described by documentation for each particular use case.

GetParamCount, GetParamName, GetParamDescription and GetParamType methods can be used to discover structure and meaning of a dictionary.

See also Interface List


HRESULT GetParamCount(int type, int* count)

Parameters

type--[in] Type of parameter to count. Expected values are enumerated in EDictionaryType_KC. See remarks

count-[out, retval] the returned number of parameters, which have the requested type

Remarks:

When type is 0 (value of EDictionaryType_KC.eKDUnknown) the method returns total size of the array. When type is EDictionaryType_KC.eKDInt, for example, the method returns count of integer parameters in the dictionary


HRESULT GetParamName(int id, BSTR *name)

Parameters

id -[in] 0-based index of a parameter. Must be greater ir equal to 0 and less than total size of the dictionary as returned by GetParamCount(EDictionaryType_KC.eKDUnknown)

Remarks:

Returns name of a parameters stored in the dictionary


HRESULT GetParamDescription(char* name, BSTR *description)

Parameters

name - [in] name of a parameter

description - [out] The returned description of the parameter

Remarks:

Returns description of the parameter


HRESULT GetParamType(char* name, int* type)

Parameters

name - [in] name of a parameter

type - [out] Type of the parameter. Returned values are enumerated in EDictionaryType_KC. See remarks

Remarks:

The method returns the type as enumerated in EDictionaryType_KC or 0 ( EDictionaryType_KC.eKDUnknown ) if the dictionary does not have parameter with the name


HRESULT GetInt(char* name, int *val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not an integer
Remarks:

Returns the integer or an error. See return values


HRESULT SetInt(char* name, int val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not an integer

HRESULT GetDouble(char* name, double *val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a double

HRESULT SetDouble(char* name, double val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a double

HRESULT GetBool(char* name, VARIANT_BOOL *val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a Boolean

HRESULT SetBool(char* name, VARIANT_BOOL val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a Boolean

HRESULT Get3State(char* name, KC3State *val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a KC3State

HRESULT Set3State(char* name, KC3State val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a KC3State

HRESULT GetString(char* name, BSTR *val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a string


HRESULT SetString(char* name, char *val)

Return Values

DISP_E_PARAMNOTOPTIONAL (Exception in .NET environment) if the name does not exist or the parameter is not a string


HRESULT Get(char* name, VARIANT *param)

Remarks:

The returned value is interpreted as Object in many environments. Its type is determined at runtime


HRESULT Set(char* name, VARIANT *param)

Remarks:

The value is interpreted as Object in many environments. Its type is determined at runtime


HRESULT GetInterface(char* name, IUnknown** interf)


HRESULT SetInterface(char* name, IUnknown* interf)