DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Expand DG Kernel ControlsDG Kernel Controls
Expand API ReferenceAPI Reference
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Models > Entities > Model Items > Measurements > Persistent Measurements Go to DGKC docs Search Documentation


Persistent Measurements

See also: Measurements Overview

Persistent measurements are part of the model. Once added to the scene they persist during viewing manipulations: rotations etc. Note that persistent measurements are not saved and loaded with the model. Contact us to request this feature. Persistent mode is the default mode of the component.

To add a distance measurement:

  • If the view is three dimensional make sure the surface is not facing the viewer flat (normal to the surface should have some non-zero angle with direction toward the viewer)
  • Make sure the view has focus (click into the window) and press 'm' key to enter the measurement mode.
  • Select the first point on surface of any object in 3D or any point in 2D with left mouse button. The first selected point will be identified by a distance line from the current mouse location
  • Select the second point on surface of any object in 3D or any point in 2D  with left mouse button.
  • Move mouse away from distance line (preferably in direction of the surface normal) to define location of the text box showing the distance. By default, the text box will be positioned in the middle of the dimension line.

To modify location of measurement text box

  • Enter the measurement mode
  • Press 'n' key
  • Select a measurement text box with the mouse and move it around while keeping the left mouse button down
  • Click outside the text box to deselect the item.

To modify direction of limit lines

  • Enter the measurement mode
  • Press 'n' key
  • Select an end of one of the limit lines and move it to rotate the line around the distance line
  • Click outside the ends to deselect the item.

To delete a measurement

  • Enter the measurement mode
  • Press 'n' key
  • Select a measurement text box and press Delete key

To delete all measurements

  • Enter the measurement mode
  • Press 'd' key

To obtain coordinates of a selected point

  • Enter the measurement mode
  • Press 'p' key
  • Select any point on the screen. Move mouse to position the text box with coordinates. Unless disabled via UseClipboard property, coordinates of the selected point will also be copied to the clipboard. In 3D mode the selected point will be located on surface of the object under the mouse or in the viewing plane if there is no object.

To append units string to the measurement text

To use a measurement as a 3D text label

See also AddMeasurementStyleLabel() in LabelEx sample.

To change displayed number of digits in the measurement text

To change snap to line tolerance

To change snap to point tolerance

Measurements are viewing functionality and are not stored with the model. Contact us if your application requires persistent measurements

Programming Measurements

To add a measurement to 3D scene model programmatically:

  1. Call IObjectGenerator_DG.Create("IMeasurement_DG()>
  2. Use IModel_DG to add the new item to the model
  3. Use methods of IMeasurement_DG to modify measurement points, positioning of the text pox and the displayed text

To programmatically modify an existing measurement in 3D scene:

Use steps 3 - 5 from the above

To programmatically modify an existing measurement in two dimensional scene:

Use the above and skip the step 3