MicroStation SDK sample- DimensionExample

Introduction

‘DimensionExample’ showcases the CRUD capabilities of the Dimension API

What does the example demonstrate?

The example describes the use of Dimension API to:

  1. Create a linear dimension on an element
  2. Create a linear dimension between two points
  3. Delete dimensions
  4. Modify the dimension text
  5. Read the dimension value

To run the Example

  1. Load the ‘DimensionExample’ application using either
    1. keyin- mdl load dimensionexample OR
    2. Utilities>MDL Applications>Browse … select: DimensionExample.ma
  1. To perform the CRUD operations on Dimension elements, make use of the various keyins available with this sample.

For example

  • Use the keyin create>dimensions>linear to create a linear dimension on an existing element (you can also create a new line element using the keyin create>dimensions>line).
  • Select the element to create a dimension on
  • A linear dimension will be created

Following is the list of other keyins available with this example:

a. create>dimensions>twopoints

        Select a start point and an endpoint to create a linear dimension

b. delete>alldimensions

Deletes all the dimensions from the model

 c. delete>singledimension

Select a dimension to delete

d. modify>dimtext

Select the dimension. This will append ‘CUSTOM TEXT’ to the selected dimension

         .

 

e. read>dimvalue

Select a dimension. It will read the dimension value of the selected dimension and display it in the message center.