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 > IData
IData Interface

IData Interface

GetRecordCount
GetFieldCount
GetFieldAt
GetDoubleAt
GetLongAt
GetStringAt
GetFieldType
GetFieldDescription

IData manages a data set. A data set is an array of records similar to a database table. Each record consists of fixed number of fields of different type. 

In this release the only place where IData is involved is the IntersectObject method of ILineMetr interface.

See also Cannon sample, Interface List


HRESULT GetRecordCount(int *count)

Parameters

count- [out] reference to an integer variable which will be set to number of records in the record set

Returns

S_OK in case of success.
 
Remarks: 

The method returns the number record in the record set.


HRESULT GetFieldCount(int *count)

Parameters

count- [out] reference to an integer variable which will be set to number of fields in each record of the set.

Return Values

S_OK in case of success.
Remarks:
 
This method returns number of fields in each record of the record set. This method along with the GetFieldDescription and GetFieldType methods allows discovering structure of the data table at runtime. 

HRESULT GetFieldAt(int index, int field, VARIANT *data)

Parameters

index - [in] index of a record in the record set.

field - [in] index of the field in the record to be retrieved

data - [out] returned value of the field. See remarks.

Returns

S_OK in case of success.

DISP_E_BADINDEX if index or field are out of range.

Remarks:

This method will return value of field-th field in index-th record. Type of data is described by vt member of the data parameter.


HRESULT GetDoubleAt(int index, int field, double *data)

Parameters

index - [in] index of a record in the record set.

field - [in] index of the field in the record to be retrieved

data - [out] returned value of the field. 

Returns

S_OK in case of success.

DISP_E_BADINDEX if index or field are out of range.

DISP_E_PARAMNOTOPTIONAL if field  does not have double or single type

Remarks:

This a shortcut for GetFieldAt method above/ This method will return value of field-th field in index-th record. The caller has to make sure that the field has double type. Types of each field in the table are described by the documentation for every particular usage. It ca also be retrieved at runtime using GetFieldType and GetFieldDescription.


HRESULT GetLongAt(int index, int field, long *data)

Parameters

index - [in] index of a record in the record set.

field - [in] index of the field in the record to be retrieved

data - [out] returned value of the field. 

Returns

S_OK in case of success.

DISP_E_BADINDEX if index or field are out of range.

DISP_E_PARAMNOTOPTIONAL if field  does not have integral type.

Remarks:

This a shortcut for GetFieldAt method above/ This method will return value of field-th field in index-th record. The caller has to make sure that the field has integer  type. Types of each field in the table are described by the documentation for every particular usage. It ca also be retrieved at runtime using GetFieldType and GetFieldDescription.


HRESULT GetStringAt(int index, int field, BSTR *string)

Parameters

index - [in] index of a record in the record set.

field - [in] index of the field in the record to be retrieved

string - [out] returned value of the field. 

Returns

S_OK in case of success.

DISP_E_BADINDEX if index or field are out of range.

DISP_E_PARAMNOTOPTIONAL if field  does not have string type.

Remarks:

This a shortcut for GetFieldAt method above/ This method will return value of field-th field in index-th record. The caller has to make sure that the field has integer  type. Types of each field in the table are described by the documentation for every particular case. It ca also be retrieved at runtime using GetFieldType and GetFieldDescription.


HRESULT GetFieldType(int field, EDataType* type)

Parameters

index - [in] index of a record in the record set.

field - [in] index of the field in the record to be retrieved

type  - [out] returned value, member of EDataType enumeration describing the type of the field.

Returns

S_OK in case of success.

Remarks:

This method along with the GetFieldCount and GetFieldDescription methods allows discovering structure of the data table at runtime. 


HRESULT GetFieldDescription(int field, BSTR *descript)

Parameters

field - [in] index of the field in the table

descript - [out] returned description string

Returns

S_OK in case of success.

Remarks:  

The method returns a short description of data stored in the field of the data table. 

This method along with the GetFieldCount and GetFieldType methods allows discovering structure of the data table at runtime.