DG Kernel Documentation


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


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)