DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


IMeasurement_KC Interface

GetPointCount
SetPointCount
GetPoint
SetPoint
GetText
SetText
GetDirection
SetDirection
GetTextLocation
SetTextLocation
GetTextPosition
SetTextPosition

IMeasurement_KC interface gives programmatic access to measurements

See also: Interface List


HRESULT GetPointCount(int* count)

Parameters

count - [out, retval] The retuned number points involved in the measurement

Remarks:

The methods returns number points involved in the measurement. In the current release possible values are: 2 for a distance measurement, 1 - for a single point


HRESULT SetPointCount(int count)

Parameters

count - [in] Number points involved in the measurement. Valid values are: 2 for a distance measurement, 1 - for a single point

Remarks:

The methods modifies number points involved in the measurement. In the current release possible values are: 2 for a distance measurement, 1 - for a single point. Number of points determines type of the measurement and the way it is rendered.


HRESULT GetPoint(int i, double* x, double* y, double* z)

Parameters

i - [in] 0-based index of the point to obtain. Must be non-negative number less than count returned by the GetPointCount method above

x, y, z [out] - coordinates of the i-th point involved in the measurement.

Remarks:

The methods returns coordinates of the i-th point involved in the measurement


HRESULT SetPoint(int i, double x, double y, double z)

Parameters

i - [in] 0-based index of the point to obtain. Must be non-negative number less than count returned by the GetPointCount method above

x, y, z [in] - coordinates of the i-th point involved in the measurement.

Remarks:

The methods modifies coordinates of the ii-th point involved in the measurement. The point has to be close to surface of an object for the measurement to be displayed corectly. This distance of snap to surface is determined dynamically as equivalent of 8 screen pixels (may be changed in future versions). Contact us about changing this parameter of snapping to the nearest obejct without a threshold


HRESULT GetText(BSTR *text)

Parameters

text - [out, retval] Text displayed in the text box of the measurement

Remarks:

The methods returns text displayed in the text box of the measurement. By default the text is the distance or coordinates of the single point. This can be changed by setting the text directly with a call to the SetText method below


HRESULT SetText(char* text)/strong>

Parameters

text - [in] The text to be displayed in the text box of the measurement

Remarks:

TThe methods modifies the text displayed in the text box of the measurement. By default the text is the distance or coordinates of the single point, but it can be changed to any single line of text so that the measurement will act as a text label attached to the specified surface.

Once this method is called the measurement displays only the specified text. Recreate the measurement to resume display of the distance or coordinates


HRESULT GetDirection(double* vx, double* vy, double* vz)/strong>

Parameters

vx, vy, vz - [out] coordinates of direction vector of the text box of the measurement

Remarks:

The methods returns coordinates of direction vector of the text box of the measurement. Location of center of the text box is determined by this direction along with TextLocation and TextPosition values determined by the methods below. By default the direction coincides with direction of normal to the surface at the point of measurement


HRESULT SetDirection(double vx, double vy, double vz)

Parameters

vertices - [out, retval] new array with elements of type IVertex

Remarks:

The methods allows programmatic modification of direction.

vector of the text box of the measurement. Location of center of the text box is determined by this direction along with TextLocation and TextPosition values determined by the methods below. By default the direction coincides with direction of normal to the surface at the point of measurement.


HRESULT GetTextLocation(double* dist)

Parameters

dist - [out, retval] The returned distance of center of the text box to the measurement point or measurement line

Remarks:

Returns distance of center of the text box to the measurement point or measurement line


HRESULT SetTextLocation(double dist)

Parameters

dist - [in]  New distance of center of the text box to the measurement point or measurement line

Remarks:

The method allows positioning the text box further from or close to the measurement line or the measurement point


HRESULT GetTextPosition(double* ratio)

Parameters

ratio - [out, retval] The returned position of the text box along the measurement line.

Remarks:

The methods returns position of the text box along the measurement line. See SetTextPosition below for details. The call does not have any effect for single point measurements.


HRESULT SetTextPosition(double ratio)

Parameters

ratio - [in] Position of the text box along the measurement line.

Remarks:

Modifies position of the text box along the measurement line. If ratio is 0 the text will be positioned above the first measurement point. If ratio is 1 the text will be positioned above the second measurement point. The call does not have any effect for single point measurements