Table of Contents

Class vdDimension

Namespace
VectorDraw.Professional.vdFigures
Assembly
VectorDraw.Professional.dll

Represents a dimension entity used to draw and manage dimension geometry (linear, rotated, radial, diameter and angular) in a drawing. A vdDimension computes its visible entities (lines, arcs, text and arrow inserts) from the definition points and the associated vdDimstyle.

public sealed class vdDimension : vdFigure, IDisposable, IVDSerialise, IBaseObject
Inheritance
vdDimension
Implements
Inherited Members

Examples

//create a simple aligned dimension with default style.

//doc is a vdDocument previously created.
var dim = new vdDimension(doc);
dim.DefPoint1 = new gPoint(-5, 0);
dim.DefPoint2 = new gPoint(5, 0);
dim.LinePosition = new gPoint(0, 2);
dim.dimType = VdConstDimType.dim_Aligned;
dim.Style = doc.DimStyles.Standard;
doc.Model.Entities.AddItem(dim);
doc.Redraw(false);

Remarks

The dimension supports per-instance overrides via the vdDimension.DimOverWrite and vdDimension.DimOverWriteEx flags, and stores any custom values in an internal vdDimstyle (accessible through properties such as TextStyle, ArrowBlock, TextHeight). Geometry is generated into an internal vdEntities collection (or a user-supplied UserBlock), and rendering is performed by drawing those entities in object coordinate system (ECS) transformed by the dimension's ECSMatrix matrix. This matrix is computed relative to ExtrusionVector.

Constructors

vdDimension()

Initializes a new instance of the vdDimension object.

vdDimension(vdDocument)

Initializes a new instance of the vdDimension object and registers it to the passed Document.

Properties

AngularType

Determines if the Angular Dimension will measure the angle or the Length.

ArrowBlock

Get/Set the vdBlock object used by the dimension as arrow.

ArrowBlock2

Get/Set the second vdBlock object of the dimension style. If set to null the ArrowBlock object will be used.

ArrowSize

Get/Set the arrow size of the dimension.

BoundingBox

Gets the Bounding Box of the vdDimension object in WorldCoordinate System.

DecimalPrecision

Get/Set the number of decimal places displayed in default dimension text.

DefPoint1

Get/Set the Definition point 1 of a vdDimension object in WCS.

DefPoint2

Get/Set the Definition point 2 of a vdDimension object in WCS.

DefPoint3

Get/Set the Definition point 3 of a vdDimension object in WCS.

DefPoint4

Get/Set the Definition point 4 of a vdDimension object in WCS.

DimAdec

Get/Set the number of decimal places for angular dimensions.

DimAunit

Get/Set the units mode for angular dimensions.

DimLength

Get the length measured by the dimension in drawing units.

DimLineColor

Represents the color of dimension lines and arrowheads.

DimLineLineType

Get/Set the Linetype of the Dimension Line.

DimLineLineWeight

Get/Set The LineWeight of the Dimension Line.

DimLunit

Get/Set the Units mode for linear dimensions.

DimOverwriteValue

Get/Set a value indicating which ovewrite values has the vdDimension object.

DimOverwriteValueEx

Get/Set a value indicating which ovewrite values has the vdDimension object.

DimTextAlignToView

A boolean value that defines if the plane of the Dimension's Text object is relative to the current view.

DimTextAlignToViewSize

Get/Set the height of the Dimension's Text object in output Device millimeters for positive or hundreds of millimeters for negative.

DimTm

Specifies the tolerance lower limit for dimension text.

DimTol

Appends tolerances to dimension text.

DimTp

Specifies the tolerance limit for dimension text.

DimZin

Get/Set a value representing the suppression of zeros in the default dimension text value.

DimaZin

Controls the suppression of zeros in the default dimension text value for Angular dimensions.

ECSMatrix

Gets the transformation Matrix that converts coordinates from the object's local coordinate system (object coordinate system, OCS) to the World Coordinate System (WCS).

EnableExtLineFixedLength

Get/Set if the ExtLineFixedLength will be used or not.

ExtLineColor

Get/Set the dimension's extension lines color.

ExtLineDist1

Get/Set how far to extend the extension lines beyond the dimension line in drawing units.

ExtLineDist2

Get/Set how far extension lines are offset from origin points in drawing units.

ExtLineFixedLength

Get/Set the maximum length of the extension lines when EnableExtLineFixedLength is true.

ExtLineLineType1

Get/Set the Linetype of the Extension Line 1.

ExtLineLineType2

Get/Set the Linetype of the Extension Line 2.

ExtLineLineWeight

Get/Set The LineWeight of the Extension Line.

ExtLineVisible

Get/Set a boolean value indicating the display of the extension lines.

ExtrusionVector

Get/Set the 3D vector extrusion direction for the object.

FractionalType

Represents the way Fractional texts will be displayed.

HorizontalRotation

Get/Set the angle in radians that represents the horizontal direction relative to the object ECSMatrix matrix. Set it to -1000 in order to always return the angle twist in radians about Z Axis of object ECSMatrix in counter-clockwise direction.

LineForced

Get/Set the visibility of extension lines between extensions viable only for radial and diameter dimensions.

LineIsInvisible

Get/Set the visibility of dimension base line.

LinePosition

Get/Set the line position of the dimension in WCS.

LinearScaleFactor

Get/Set the scale factor for dimensioning by which the default dimension Length is multiplyed.

Measurement

Get/Set the measurement of the dimension.

Oblique

Get/Set the oblique angle of the dimension in radians.

PostString

Specifies a text prefix or suffix (or both) to the dimension measurement.

ReferenceObj

The reference Object of the vdDimension

Rotation

Get/Set the rotation of the dimension in radians.

ScaleFactor

Get/Set the scale factor of the dimension.

Style

Get/Set the vdDimstyle of the vdDimension object.

TextBackGroundMask

Get/Set a boolean value that represents if the backgroundmask color will be used.

TextBackGroundMaskBorderColor

Get/Set the vdColor that the border of the mtext will be drawn.

TextBackGroundMaskBorderPenWidth

Get/Set the object's backgroundMaskBorder pen width in drawing units.

TextBackGroundMaskColor

Get/Set the vdColor that will fill the box of the mtext.

TextBackGroundMaskOffset

Get/Set the object's backgroundMask offset.

TextBackgroundMaskBorder

Get/Set a boolean value that represents if the BackgroundMaskBorder color will be used.

TextColor

Get/Set the dimension's text color.

TextDist

Get/Set the distance around the dimension's text.

TextHeight

Get/Set the Dimension's text height in drawing units that will be used to render the height (size) of the dimension text.

TextHorRotation

Get/Set the position of dimension text inside the extension lines(aligned or horizontal).

TextMovement

Get/Set a value that represents how the dimension will change according to the dimension's text position change.

TextPosition

Get/Set the text position of the dimension in WCS.

TextStyle

Get/Set the vdTextstyle object used for the dimension's text.

TextVerJust

Get/Set the vertical justification of dimension text along the dimension line.

UserBlock

Returns a user ovveride vdBlock used to draw the dimension.

UsingDefaultTextPosition

Get/Set a boolean value representing the dimension's text position.

dimText

Get/Set the dimension's text.

dimType

Get/Set the dimension's type.

param1

This is used to identify the segment of the polyline that is referenced , used only when the ReferenceObj is a vdPolyline object.

Methods

DeSerialize(DeSerializer, string, object)

This Function is called foreach field name of the vdDimension object when opening in vdml format.

Dispose()

Releases all resources used by this object.

Draw(vdRender)

Called in order to draw the object in a specified vdRender object.

Explode()

Explodes the vdDimension object into it's entities.

GetCompareHash()

Returns a unique 32 bit integer value according to the object type and its properties values

GetDisplayedText()

Returns the text that is displayed to the dimension or null if the dimension uses a block that does not contain a Text or Mtext object.

GetFormattedText()

Get the text of the dimension as string.

GetGripPoints()

A function returning the grip points of the object.

GetMtextPosition()

returns the position of the dimension text Insertion point in World CS.

GetTableDependecies(vdTableDependeciesArgs)

Fills the passed vdTableDependeciesArgs args with all the table references of this object (vdLayer, vdBlock, vdDimstyle, vdLineType, vdTextstyle, vdImageDef, vdHatchPattern etc).

GetValidGripPointsItems()

Returns the number of valid grip points of the object. Must return the same number of points as the GetGripPoints() method.

GetdimDefaultText()

Returns the default string that will be displayed to the dimension calculated by the distance of the dimension's points and is the text that will be displayed after an update of the dimension.

HasOverwritevalue(DimOverWrite)

Checks if a specific ovewrite value exists to the dimension.

HasOverwritevalueEx(DimOverWriteEx)

Checks if a specific ovewrite value exists to the dimension.

InitializeProperties()

Resets the properties of the vdDimension object to the Default values.

InternalSetOwner(vdBaseObject)

Internally used only.

Set the object owner

IntersectWith(vdFigure, VdConstInters, gPoints)

Finds the intersection points of an object with another object.

MatchProperties(vdPrimary, vdDocument)

Matches all the common properties from an object and sets them to this object.

MoveGripPointsAt(Int32Array, double, double, double)

This function is intended to be called during a grip edit of the vDimension object.

Serialize(Serializer)

This Function is called when saving the vdDimension object to vdml format.

SetAngularFrom2Lines(gPoint, gPoint, gPoint, gPoint, gPoint)

Set the dimension type dim_Angular and calculate the Angle Vertex points by two lines.

ShouldBeTransformed(vdSelection, bool)

This method is used in order to determine what should happen when a transformBy occurs in a collection.

ToString()

Gets a System.String that represents the type of the vdDimension Object.

Transformby(Matrix)

Transforms all geometrical properties of this object by the specified Matrix.

Update()

Updates the object after change of properties.

See Also