CorelDRAW Community
Site
Search
User
Site
Search
User
Developer Area
Forums
Wikis
API References
Tags
More
Cancel
New
Developer Area requires membership for participation - click to join
Applications:
Corel DESIGNER
Corel PHOTO-PAINT
CorelDRAW
Versions:
CorelDRAW 2017
CorelDRAW 2018
CorelDRAW 2019
CorelDRAW 2019.2
CorelDRAW 2020
CorelDRAW 2020.1
CorelDRAW 2021
CorelDRAW 2021.5
CorelDRAW 2022-v24
CorelDRAW 2022-v24.1
CorelDRAW 2022-v24.2
CorelDRAW 2023-v24.3
CorelDRAW 2023-v24.5
CorelDRAW 2024-v25
CorelDRAW X7
CorelDRAW X7.4
CorelDRAW X7.6
CorelDRAW X8
Classes:
ActiveView
AIExport
Application
AppStatus
AppWindow
ArrowHead
ArrowHeadOptions
ArrowHeads
BBoxSnapPoint
Bitmap
BitmapImage
BMPExport
BSpline
BSplineControlPoint
BSplineControlPoints
CalloutShape
CEPSExport
CGMExport
CGMImport
Clipboard
CloneLink
Color
ColorContext
ColorManagementPolicy
ColorManager
ColorProfile
ColorProfiles
Colors
CommandBar
CommandBarMode
CommandBarModes
CommandBars
Component
Components
Connector
Control
Controls
CorelScriptTools
CrossPoint
CrossPoints
Curve
CustomEffect
CustomShape
DataContext
DataField
DataFields
DataItem
DataItems
DataSourceProxy
Dimension
DimensionAngular
DimensionLinear
DockHost
DockHosts
DockItem
DockItems
Document
Documents
DSFImport
Duotone
DuotoneInk
DuotoneOverprint
DXFExport
DXFImport
EdgeSnapPoint
Effect
EffectBevel
EffectBlend
EffectContour
EffectControlPath
EffectCustomDistortion
EffectDistortion
EffectDropShadow
EffectEnvelope
EffectExtrude
EffectInnerShadow
EffectLens
EffectPerspective
EffectPushPullDistortion
Effects
EffectTextOnPath
EffectTwisterDistortion
EffectZipperDistortion
Ellipse
EMFExport
EPS
ExportFilter
ExtrudeVanishingPoint
Fill
FillMetadata
FontList
FountainColor
FountainColors
FountainFill
FrameWindow
FrameWindows
FrameWork
GEMExport
GIFExport
GlobalMacroStorage
GMSMacro
GMSMacros
GMSManager
GMSProject
GMSProjects
Grid
Guide
HatchFill
HatchFills
HatchLibraries
HatchLibrary
HatchPattern
HatchPatterns
HPGLExport
HPGLImport
Image
ImageList
ImageTile
ImageTiles
ImportFilter
JP2Export
JPGExport
Layer
Layers
LocalizableString
MathUtils
Metadata
Node
NodeRange
Nodes
ObjectSnapPoint
OLE
OnScreenCurve
OnScreenHandle
OnScreenText
Outline
OutlineStyle
OutlineStyles
Page
Pages
PageSize
PageSizes
Palette
PaletteManager
Palettes
PatternCanvas
PatternCanvases
PatternFill
PDFVBASettings
PNGExport
Point
PointRange
Polygon
PostScriptFill
PowerClip
PrintDocuments
Printer
PrintJob
PrintLayout
PrintOptions
PrintPages
PrintPostScript
PrintPrepress
PrintSeparations
PrintSettings
PrintTrapping
ProofColorSettings
Properties
PSScreenOptions
RecentFile
RecentFiles
Rect
Rectangle
Rulers
ScreenRect
Segment
SegmentRange
Segments
SelectionInfo
SeparationPlate
SeparationPlates
Shape
ShapeRange
Shapes
SnapPoint
SnapPointRange
SnapPoints
Spread
Spreads
StatusText
StructAlignProperties
StructColorConversionOptions
StructCreateOptions
StructExportOptions
StructFontProperties
StructHyphenationSettings
StructImportCropOptions
StructImportOptions
StructImportResampleOptions
StructOpenOptions
StructPaletteOptions
StructPasteOptions
StructSaveAsOptions
StructSpaceProperties
Style
StyleCharacter
StyleFill
StyleFrame
StyleOutline
StyleParagraph
Styles
StyleSheet
StyleTransparency
SubPath
SubPaths
SVGExport
Symbol
SymbolDefinition
SymbolDefinitions
SymbolLibraries
SymbolLibrary
SystemPrinters
TableBorders
TableCell
TableCellRange
TableCells
TableColumn
TableColumns
TableRow
TableRows
TableShape
Text
TextCharacters
TextColumns
TextFrame
TextFrames
TextIndentLevelStyle
TextIndentLevelStyles
TextLines
TextParagraphs
TextRange
TextRanges
TextTabPosition
TextTabPositions
TextureFill
TextureFillProperties
TextureFillProperty
TextVariableAxes
TextVariableAxis
TextWords
TGAExport
ToolShape
ToolShapeAttributes
ToolState
ToolStateAttributes
TraceSettings
TransformMatrix
Transparency
TrapLayer
TrapLayers
TreeManager
TreeNode
TreeNodes
URL
UserSnapPoint
Vector
View
ViewHost
ViewHosts
Views
ViewWindow
ViewWindows
WEBPExport
Window
Windows
WMFExport
Workspace
Workspaces
WPGExport
Interfaces:
IColorConversionHandler
ICUIAutomation
ICUIBackgroundTask
ICUIControlData
ICUIDataSourceFactory
ICUIRunningBackgroundTask
ICUIRunningTask
ICUITask
ICUITaskManager
ICUIWarning
IFilterSettings
IGIFFilterSettings
IImportCropHandler
IImportResampleHandler
IJPGFilterSettings
IPDFSettingsInternal
IPerspectiveGroupProperties
IPerspectiveGroupShape
IPNGFilterSettings
IQuickExport
IQuickExportItem
IQuickExportSettings
IVGApplicationEvents
IVGAppPlugin
IVGComment
IVGCommentAnnotation
IVGCommentAuthor
IVGComments
IVGCommentTarget
IVGCommentThread
IVGCommentThreads
IVGDocumentEvents
IVGDocumentMarkup
IVGPageMarkup
IVGVariableWidthNode
IVGVariableWidthNodes
IWEBPFilterSettings
Enums:
AiVersion
BmpVersion
cdrAddinFilter
cdrAlignDistributeH
cdrAlignDistributeV
cdrAlignment
cdrAlignShapesTo
cdrAlignType
cdrAntiAliasingType
cdrApplicationClass
cdrApplicationID
cdrAppStartupMode
cdrAuthorAuthentication
cdrBevelMode
cdrBevelType
cdrBlendMode
cdrCalloutEnding
cdrCalloutHaloJustify
cdrCalloutTextSource
cdrCGMRegionType
cdrCloneLinkType
cdrColorMode
cdrColorSettings
cdrColorType
cdrCommandCheckState
cdrCommentAnnotationType
cdrCommentStatus
cdrCommentType
cdrCompareCondition
cdrCompareType
cdrCompressionType
cdrConnectorType
cdrContourCornerType
cdrContourDirection
cdrContourEndCapType
cdrCopyProperties
cdrCornerType
cdrCursorShape
cdrCurveElementFlags
cdrCurveElementType
cdrDataFormatType
cdrDataType
cdrDimensionAngularUnits
cdrDimensionLinearUnits
cdrDimensionPlacement
cdrDimensionStyle
cdrDimensionSymbol
cdrDimensionType
cdrDirection
cdrDistanceMode
cdrDistortionType
cdrDistributeArea
cdrDistributeType
cdrDitherType
cdrDocLayout
cdrDropShadowType
cdrDuotoneType
cdrEdgeType
cdrEffectType
cdrEllipseType
cdrEnvelopeCopyMode
cdrEnvelopeMode
cdrExportRange
cdrExtrudeLightPosition
cdrExtrudeShading
cdrExtrudeType
cdrExtrudeVPType
cdrFeatherType
cdrFileVersion
cdrFillMode
cdrFillStyleType
cdrFillType
cdrFilter
cdrFittedOrientation
cdrFittedPlacement
cdrFittedQuadrant
cdrFittedVertPlacement
cdrFlipAxes
cdrFontCase
cdrFontLine
cdrFontPosition
cdrFontStyle
cdrFountainFillBlendType
cdrFountainFillSpreadMethod
cdrFountainFillType
cdrGridType
cdrGuideType
cdrHalftoneType
cdrImageMode
cdrImagePaletteType
cdrImageType
cdrImportMode
cdrImportTableOutline
cdrImportTextFormatting
cdrLensType
cdrLinearDimensionType
cdrLineSpacingType
cdrMergeMode
cdrMultipageLayout
cdrNodeType
cdrObjectSnapPointType
cdrOLEType
cdrOnScreenCurvePenStyle
cdrOnScreenTextAlign
cdrOutlineDashAdjust
cdrOutlineJustification
cdrOutlineLineCaps
cdrOutlineLineJoin
cdrOutlineType
cdrOverprintState
cdrPageBackground
cdrPageOrientation
cdrPaletteID
cdrPaletteSortMethod
cdrPaletteType
cdrPaletteVersion
cdrPanoseMatchingType
cdrPatternCanvasSize
cdrPatternFillType
cdrPerspPlane
cdrPerspPreset
cdrPointType
cdrPolygonType
cdrPositionOfPointOverShape
cdrPresetPoint
cdrProjectPlane
cdrReferencePoint
cdrRenderType
cdrSegmentOffsetType
cdrSegmentType
cdrShapeChangeScope
cdrShapeEnumDirection
cdrShapeLevel
cdrShapeLinkType
cdrShapeType
cdrSpiralType
cdrSymbolType
cdrTableBorder
cdrTextAlignOrigin
cdrTextChangeCase
cdrTextCharSet
cdrTextEffect
cdrTextFrames
cdrTextIndentLevelStyle
cdrTextIndexingType
cdrTextLanguage
cdrTextPropertySet
cdrTextTabAlignment
cdrTextType
cdrTexturePropertyType
cdrThumbnailSize
cdrTileOffsetType
cdrTools
cdrTraceBackgroundMode
cdrTraceType
cdrTransparencyAppliedTo
cdrTransparencyType
cdrTreeNodeType
cdrTriState
cdrUnit
cdrURLRegion
cdrVerticalAlignment
cdrViewType
cdrWeldFlags
cdrWeldMethod
cdrWindowArrangeStyle
cdrWindowState
cdrWrapStyle
CgmCharsetMode
CgmColorMode
CgmFallbackCode
CgmFileEncoding
CgmFormat
CgmOutputPrecision
CgmTextEncoding
clrColorEngine
clrColorModel
clrColorPolicyAction
clrCompPrnCalibration
clrDeviceType
clrExportColorCorrection
clrImportColorCorrection
clrMonitorCalibration
clrRenderingIntent
cuiBarPosition
cuiBarProtection
cuiBarType
cuiDockHostOrientation
cuiDockItemType
cuiDockOperation
cuiMessageBoxFlags
cuiTaskPriority
cuiWindowState
DsfLinestyle
DxfBitmapType
DxfProjections
DxfScale
DxfUnits
DxfVersion
EpsBBoxType
EpsBitmapType
EpsColorProfile
EpsImageHeader
EpsObjectsColorType
EpsPSLevel
EpsSpotToColorType
EpsTIFFHeaderType
GifTransparency
HpglFillType
Jp2Progression
Jp2Subformat
pdfBitmapCompressionType
pdfColorMode
pdfColorProfile
pdfDisplayOnStart
pdfEditPermissions
pdfEncodingType
pdfEncryptionType
pdfEPSAs
pdfExportRange
pdfPrintPermissions
pdfSpotType
pdfTextExportMode
pdfVersion
pltOriginType
PngTransparency
PrnBitmapColorMode
PrnColorMode
PrnFileMode
PrnImageTrap
PrnObjectsColorMode
PrnPageMatchingMode
PrnPageSet
PrnPaperOrientation
PrnPaperSize
PrnPDFStartup
PrnPlaceType
PrnPlateType
PrnPostScriptLevel
PrnPrintRange
PrnRegistrationStyle
PrnTrapType
SvgBmpExportType
SvgCharacterSubsetting
SvgDrawingPrecision
SvgEncoding
SvgStyling
SvgUnits
SvgVersion
TgaVersion
WpgColorMode
WpgVersion
Structures:
CurveElement
Modules:
UICategories
C++/CLI
C++
C#
JS
VB
VBA
API Documentation
>
CorelDRAW
>
2023-v24.3
>
Layer
>
IVGLayer
Layer.CreateLinearDimension method
Creates a linear dimension
Syntax:
Function
CreateLinearDimension
(
ByVal
Type
As
cdrLinearDimensionType
,
ByVal
Point1
As
SnapPoint
,
ByVal
Point2
As
SnapPoint
,
Optional
ByVal
TextCentered
As
Boolean
=
True
,
Optional
ByVal
TextX
As
Double
=
0
,
Optional
ByVal
TextY
As
Double
=
0
,
Optional
ByVal
Style
As
cdrDimensionStyle
=
cdrDimensionStyleDecimal
,
Optional
ByVal
Precision
As
Long
=
2
,
Optional
ByVal
ShowUnits
As
Boolean
=
True
,
Optional
ByVal
Units
As
cdrDimensionLinearUnits
=
cdrDimensionUnitMM
,
Optional
ByVal
Placement
As
cdrDimensionPlacement
=
cdrDimensionWithinLine
,
Optional
ByVal
HorizontalText
As
Boolean
=
False
,
Optional
ByVal
BoxedText
As
Boolean
=
False
,
Optional
ByVal
LeadingZero
As
Boolean
=
True
,
Optional
ByVal
Prefix
As
String
,
Optional
ByVal
Suffix
As
String
,
Optional
ByVal
OutlineWidth
As
Double
=
-1
,
Optional
ByVal
Arrows
As
ArrowHead
=
Nothing
,
Optional
ByVal
OutlineColor
As
Color
=
Nothing
,
Optional
ByVal
TextFont
As
String
,
Optional
ByVal
TextSize
As
Double
=
0
,
Optional
ByVal
TextColor
As
Color
=
Nothing
)
As
Shape
Parameters:
Name
Type
Description
Type
cdrLinearDimensionType
Specifies the type of linear dimension that is created
Point1
SnapPoint
Specifies a snap point that represents one endpoint of the linear dimension
Point2
SnapPoint
Specifies a snap point that represents one endpoint of the linear dimension
TextCentered
Boolean
Specifies whether to center the text on the dimension line.
True
centers the text, while
False
leaves the text at the specified coordinates.
TextX
Double
Specifies the horizontal position of the text label.
TextY
Double
Specifies the vertical position of the text label.
Style
cdrDimensionStyle
Specifies the number-formatting style for the dimension value of the text label.
Precision
Long
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.
ShowUnits
Boolean
Specifies whether to display the unit of measurement in the label.
Units
cdrDimensionLinearUnits
Specifies the unit of measurement for the dimension value.
Placement
cdrDimensionPlacement
Specifies the placement of the text label relative to its dimension line.
HorizontalText
Boolean
Specifies how to position dimension text.
True
rotates the dimension text horizontally, while
False
leaves the dimension text parallel to the dimension line.
BoxedText
Boolean
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.
LeadingZero
Boolean
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.
Prefix
String
Specifies the prefix for the dimension label (that is, the text displayed before the dimension value).
Suffix
String
Specifies the suffix for the dimension label (that is, the text displayed after the dimension value).
OutlineWidth
Double
Specifies the outline width.
Arrows
ArrowHead
Specifies the desired arrowheads.
OutlineColor
Color
Specifies the outline color.
TextFont
String
Specifies the text font.
TextSize
Double
Specifies the text size.
TextColor
Color
Specifies the text color.
Remarks:
The
CreateLinearDimension
method creates a linear dimension at a specified location on a layer.
Version Information:
CorelDRAW:
X7.4
,
X7
,
X7.6
,
X8
,
2017
,
2018
,
2019
,
2019.2
,
2020
,
2021
,
2020.1
,
2021.5
,
2022-v24
,
2022-v24.1
,
2022-v24.2
,
2023-v24.3
,
2023-v24.5
,
2024-v25
Corel DESIGNER:
X7
,
2017.1
,
20.1
,
2019.2
,
2020.1
,
2021.5
,
2022-v24
,
2022-v24.1
,
2022-v24.2
,
2023-v24.3
,
2023-v24.5
,
2024-v25