Previous Document Next Document

Object Model Reference : Classes : L : Layer : Methods : Layer.CreateLinearDimension


Layer.CreateLinearDimension

Function CreateLinearDimension(Type As cdrLinearDimensionType, Point1 As SnapPoint, Point2 As SnapPoint, [TextCentered As Boolean = True], [TextX As Double], [TextY As Double], [Style As cdrDimensionStyle = cdrDimensionStyleDecimal], [Precision As Long = 2], [ShowUnits As Boolean = True], [Units As cdrDimensionLinearUnits = cdrDimensionUnitMM], [Placement As cdrDimensionPlacement = cdrDimensionWithinLine], [HorizontalText As Boolean = False], [BoxedText As Boolean = False], [LeadingZero As Boolean = True], [Prefix As String], [Suffix As String], [OutlineWidth As Double = -1], [Arrows As ArrowHead], [OutlineColor As Color], [TextFont As String], [TextSize As Double], [TextColor As Color]) As Shape

Description

Member of Layer

The CreateLinearDimension method creates a linear dimension at a specified location on a layer.

Parameter
Description
Type
Specifies the type of linear dimension that is created
Point1
Specifies a snap point that represents one endpoint of the linear dimension
Point2
Specifies a snap point that represents one endpoint of the linear dimension
TextCentered
Specifies whether to center the text on the dimension line. True centers the text, while False leaves the text at the specified coordinates.
This parameter is optional, and its default value is True.
TextX
Specifies the horizontal position of the text label. This parameter is optional, and its default value is 0.
TextY
Specifies the vertical position of the text label. This parameter is optional, and its default value is 0.
Style
Specifies the number-formatting style for the dimension value of the text label. This parameter is optional, and its default value is cdrDimensionStyleDecimal (0).
Precision
Specifies the number of significant digits for the dimension label to display after the decimal point, if using a decimal format for the dimension value. This parameter is optional, and its default value is 2.
ShowUnits
Specifies whether to display the unit of measurement in the label. This parameter is optional, and its default value is True.
Units
Specifies the unit of measurement for the dimension value. This parameter is optional, and its default value is cdrDimensionUnitMM (15).
Placement
Specifies the placement of the text label relative to its dimension line. This parameter is optional, and its default value is cdrDimensionWithinLine (1).
HorizontalText
Specifies how to position dimension text. True rotates the dimension text horizontally, while False leaves the dimension text parallel to the dimension line. This parameter is optional, and its default value is False.
BoxedText
Specifies whether the dimension value has a visible border with the same properties as the dimension line — that is, whether the dimension label is enclosed by a rectangle. This parameter is optional, and its default value is False.
LeadingZero
Specifies whether the text value displays a leading zero for numbers that are less than 1.0 and for which a decimal format is used. This parameter is optional, and its default value is True.
Prefix
Specifies the prefix for the dimension label (that is, the text displayed before the dimension value). This parameter is optional.
Suffix
Specifies the suffix for the dimension label (that is, the text displayed after the dimension value). This parameter is optional.
OutlineWidth
Specifies the outline width. This parameter is optional, and its default value is -1.
Arrows
Specifies the desired arrowheads. This parameter is optional, and its default value is Nothing.
OutlineColor
Specifies the outline color. This parameter is optional, and its default value is Nothing.
TextFont
Specifies the text font. This parameter is optional.
TextSize
Specifies the text size. This parameter is optional, and its default value is 0.
TextColor
Specifies the text color. This parameter is optional, and its default value is Nothing.

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.