Show / Hide Table of Contents

Class DimensionStyle

Represents a dimension style.

Inheritance
System.Object
DxfObject
TableObject
DimensionStyle
Implements
IHasXData
System.ICloneable
System.IComparable
System.IComparable<TableObject>
System.IEquatable<TableObject>
Inherited Members
TableObject.NameChanged
TableObject.OnNameChangedEvent(String, String)
TableObject.XDataAddAppReg
TableObject.OnXDataAddAppRegEvent(ApplicationRegistry)
TableObject.XDataRemoveAppReg
TableObject.OnXDataRemoveAppRegEvent(ApplicationRegistry)
TableObject.Name
TableObject.IsReserved
TableObject.InvalidCharacters
TableObject.XData
TableObject.IsValidName(String)
TableObject.ToString()
TableObject.CompareTo(Object)
TableObject.CompareTo(TableObject)
TableObject.GetHashCode()
TableObject.Equals(Object)
TableObject.Equals(TableObject)
DxfObject.CodeName
DxfObject.Handle
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class DimensionStyle : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>

Constructors

| Improve this Doc View Source

DimensionStyle(String)

Initializes a new instance of the DimensionStyle class.

Declaration
public DimensionStyle(string name)
Parameters
Type Name Description
System.String name

The dimension style name.

Fields

| Improve this Doc View Source

DefaultName

Default dimension style name.

Declaration
public const string DefaultName = "Standard"
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

AlternateUnits

Gets or sets the alternate units format for dimensions.

Declaration
public DimensionStyleAlternateUnits AlternateUnits { get; set; }
Property Value
Type Description
DimensionStyleAlternateUnits
Remarks

Alternative units are not applicable for angular dimensions.

| Improve this Doc View Source

AngularPrecision

Gets or sets the number of precision places displayed in angular dimensions. (DIMADEC)

Declaration
public short AngularPrecision { get; set; }
Property Value
Type Description
System.Int16
Remarks

Default: 0
If set to -1 angular dimensions display the number of decimal places specified by LengthPrecision. It is recommended to use values in the range 0 to 8.

| Improve this Doc View Source

ArrowSize

Controls the size of dimension line and leader line arrowheads. Also controls the size of hook lines. (DIMASZ)

Declaration
public double ArrowSize { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.18

| Improve this Doc View Source

CenterMarkSize

Controls the drawing of circle or arc center marks and centerlines. (DIMCEN)

Declaration
public double CenterMarkSize { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.09
0 - No center marks or lines are drawn.
greater than 0 - Center marks are drawn.
lower than 0 - Center marks and centerlines are drawn.
The absolute value specifies the size of the center mark or centerline. The size of the centerline is the length of the centerline segment that extends outside the circle or arc. It is also the size of the gap between the center mark and the start of the centerline. The size of the center mark is the distance from the center of the circle or arc to the end of the center mark.

| Improve this Doc View Source

DecimalSeparator

Gets or sets a single-character decimal separator to use when creating dimensions whose unit format is decimal. (DIMDSEP)

Declaration
public char DecimalSeparator { get; set; }
Property Value
Type Description
System.Char
Remarks

Default: "."

| Improve this Doc View Source

Default

Gets the default dimension style.

Declaration
public static DimensionStyle Default { get; }
Property Value
Type Description
DimensionStyle
| Improve this Doc View Source

DimAngularUnits

Gets or sets the units format for angular dimensions. (DIMAUNIT)

Declaration
public AngleUnitType DimAngularUnits { get; set; }
Property Value
Type Description
AngleUnitType
Remarks

Decimal degrees
Degrees/minutes/seconds
Gradians
Radians

| Improve this Doc View Source

DimArrow1

Gets or sets the arrowhead block for the first end of the dimension line. (DIMBLK1)

Declaration
public Block DimArrow1 { get; set; }
Property Value
Type Description
Block
Remarks

Default: null. Closed filled.

| Improve this Doc View Source

DimArrow2

Gets or sets the arrowhead block for the second end of the dimension line. (DIMBLK2)

Declaration
public Block DimArrow2 { get; set; }
Property Value
Type Description
Block
Remarks

Default: null. Closed filled.

| Improve this Doc View Source

DimBaselineSpacing

Gets or sets the spacing of the dimension lines in baseline dimensions. (DIMDLI)

Declaration
public double DimBaselineSpacing { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.38
This value is stored only for information purposes. Base dimensions are a compound entity made of several dimensions, there is no actual DXF entity that represents that.

| Improve this Doc View Source

DimLengthUnits

Gets or sets the units for all dimension types except angular. (DIMLUNIT)

Declaration
public LinearUnitType DimLengthUnits { get; set; }
Property Value
Type Description
LinearUnitType
Remarks

Scientific
Decimal
Engineering
Architectural
Fractional

| Improve this Doc View Source

DimLine1Off

Suppresses display of the first dimension line. (DIMSD1)

Declaration
public bool DimLine1Off { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false
To completely suppress the dimension line set both DimLine1Off and DimLine2Off to false.

| Improve this Doc View Source

DimLine2Off

Suppresses display of the second dimension line. (DIMSD2)

Declaration
public bool DimLine2Off { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false
To completely suppress the dimension line set both DimLine1Off and DimLine2Off to false.

| Improve this Doc View Source

DimLineColor

Gets or set the color assigned to dimension lines, arrowheads, and dimension leader lines. (DIMCLRD)

Declaration
public AciColor DimLineColor { get; set; }
Property Value
Type Description
AciColor
Remarks

Default: ByBlock
Only indexed AciColors are supported.

| Improve this Doc View Source

DimLineExtend

Gets or sets the distance the dimension line extends beyond the extension line when oblique, architectural tick, integral, or no marks are drawn for arrowheads. (DIMDLE)

Declaration
public double DimLineExtend { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.0

| Improve this Doc View Source

DimLineLinetype

Gets or sets the line type of the dimension line. (DIMLTYPE)

Declaration
public Linetype DimLineLinetype { get; set; }
Property Value
Type Description
Linetype
Remarks

Default: ByBlock

| Improve this Doc View Source

DimLineLineweight

Gets or sets the line weight to dimension lines. (DIMLWD)

Declaration
public Lineweight DimLineLineweight { get; set; }
Property Value
Type Description
Lineweight
Remarks

Default: ByBlock

| Improve this Doc View Source

DimPrefix

Gets or sets the text prefix for the dimension. (DIMPOST)

Declaration
public string DimPrefix { get; set; }
Property Value
Type Description
System.String
Remarks

Default: string.Empty

| Improve this Doc View Source

DimRoundoff

Gets or sets the value to round all dimensioning distances. (DIMRND)

Declaration
public double DimRoundoff { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0 (no rounding off).
If DIMRND is set to 0.25, all distances round to the nearest 0.25 unit. If you set DIMRND to 1.0, all distances round to the nearest integer. Note that the number of digits edited after the decimal point depends on the precision set by DIMDEC. DIMRND does not apply to angular dimensions.

| Improve this Doc View Source

DimScaleLinear

Gets or sets a scale factor for linear dimension measurements. (DIMLFAC)

Declaration
public double DimScaleLinear { get; set; }
Property Value
Type Description
System.Double
Remarks

All linear dimension distances, including radii, diameters, and coordinates, are multiplied by DimScaleLinear before being converted to dimension text.
Positive values of DimScaleLinear are applied to dimensions in both model space and paper space; negative values are applied to paper space only.
DimScaleLinear has no effect on angular dimensions.

| Improve this Doc View Source

DimScaleOverall

Get or set the overall scale factor applied to dimensioning variables that specify sizes, distances, or offsets. (DIMSCALE)

Declaration
public double DimScaleOverall { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 1.0
DIMSCALE does not affect measured lengths, coordinates, or angles.
DIMSCALE values of zero are not supported, any imported drawing with a zero value will set the scale to the default 1.0.

| Improve this Doc View Source

DimSuffix

Gets or sets the text suffix for the dimension. (DIMPOST)

Declaration
public string DimSuffix { get; set; }
Property Value
Type Description
System.String
Remarks

Default: string.Empty

| Improve this Doc View Source

ExtLine1Linetype

Gets or sets the line type of the first extension line. (DIMLTEX1)

Declaration
public Linetype ExtLine1Linetype { get; set; }
Property Value
Type Description
Linetype
Remarks

Default: ByBlock

| Improve this Doc View Source

ExtLine1Off

Suppresses display of the first extension line. (DIMSE1)

Declaration
public bool ExtLine1Off { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false

| Improve this Doc View Source

ExtLine2Linetype

Gets or sets the line type of the second extension line. (DIMLTEX2)

Declaration
public Linetype ExtLine2Linetype { get; set; }
Property Value
Type Description
Linetype
Remarks

Default: ByBlock

| Improve this Doc View Source

ExtLine2Off

Suppresses display of the second extension line. (DIMSE2)

Declaration
public bool ExtLine2Off { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false

| Improve this Doc View Source

ExtLineColor

Gets or sets the color assigned to extension lines, center marks, and centerlines. (DIMCLRE)

Declaration
public AciColor ExtLineColor { get; set; }
Property Value
Type Description
AciColor
Remarks

Default: ByBlock
Only indexed AciColors are supported.

| Improve this Doc View Source

ExtLineExtend

Gets or sets how far to extend the extension line beyond the dimension line. (DIMEXE)

Declaration
public double ExtLineExtend { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.18

| Improve this Doc View Source

ExtLineFixed

Enables fixed length extension lines. (DIMFXLON)

Declaration
public bool ExtLineFixed { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false

| Improve this Doc View Source

ExtLineFixedLength

Gets or sets the total length of the extension lines starting from the dimension line toward the dimension origin. (DIMFXL)

Declaration
public double ExtLineFixedLength { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 1.0

| Improve this Doc View Source

ExtLineLineweight

Gets or sets line weight of extension lines. (DIMLWE)

Declaration
public Lineweight ExtLineLineweight { get; set; }
Property Value
Type Description
Lineweight
Remarks

Default: ByBlock

| Improve this Doc View Source

ExtLineOffset

Gets or sets how far extension lines are offset from origin points. (DIMEXO)

Declaration
public double ExtLineOffset { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.0625

| Improve this Doc View Source

FitDimLineForce

Gets or sets the drawing of a dimension line between the extension lines even when the text is placed outside the extension lines. (DIMTOFL)

Declaration
public bool FitDimLineForce { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false

| Improve this Doc View Source

FitDimLineInside

Gets or sets the drawing of the dimension line and arrowheads even if not enough space is available inside the extension lines. (DIMSOXD)

Declaration
public bool FitDimLineInside { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: true
If not enough space is available inside the extension lines and FitTextInside is true, setting FitDimLineInside to false suppresses the arrowheads. If FitDimLineInside is false, FitDimLineInside has no effect.

| Improve this Doc View Source

FitOptions

Gets or sets the placement of text and arrowheads based on the space available between the extension lines. (DIMATFIT)

Declaration
public DimensionStyleFitOptions FitOptions { get; set; }
Property Value
Type Description
DimensionStyleFitOptions
Remarks

Default: BestFit
Not implemented in the dimension drawing.

| Improve this Doc View Source

FitTextInside

Gets or sets the drawing of text between the extension lines. (DIMTIX)

Declaration
public bool FitTextInside { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false

| Improve this Doc View Source

FitTextMove

Gets or sets the position of the text when it's moved either manually or automatically. (DIMTMOVE)

Declaration
public DimensionStyleFitTextMove FitTextMove { get; set; }
Property Value
Type Description
DimensionStyleFitTextMove
Remarks

Default: BesideDimLine

| Improve this Doc View Source

FractionType

Gets or sets the fraction format when DIMLUNIT is set to Architectural or Fractional. (DIMFRAC)

Declaration
public FractionFormatType FractionType { get; set; }
Property Value
Type Description
FractionFormatType
Remarks

Horizontal stacking
Diagonal stacking
Not stacked (for example, 1/2)

| Improve this Doc View Source

Iso25

Gets the ISO-25 dimension style as defined in AutoCad.

Declaration
public static DimensionStyle Iso25 { get; }
Property Value
Type Description
DimensionStyle
| Improve this Doc View Source

LeaderArrow

Gets or sets the arrowhead block for leaders. (DIMLDRBLK)

Declaration
public Block LeaderArrow { get; set; }
Property Value
Type Description
Block
Remarks

Default: null. Closed filled.

| Improve this Doc View Source

LengthPrecision

Gets or sets the number of decimal places displayed for the primary units of a dimension. (DIMDEC)

Declaration
public short LengthPrecision { get; set; }
Property Value
Type Description
System.Int16
Remarks

Default: 2
It is recommended to use values in the range 0 to 8.
For architectural and fractional the precision used for the minimum fraction is 1/2^LinearDecimalPlaces.

| Improve this Doc View Source

Owner

Gets the owner of the actual dimension style.

Declaration
public DimensionStyles Owner { get; }
Property Value
Type Description
DimensionStyles
| Improve this Doc View Source

SuppressAngularLeadingZeros

Suppresses leading zeros in angular decimal dimensions. (DIMZIN)

Declaration
public bool SuppressAngularLeadingZeros { get; set; }
Property Value
Type Description
System.Boolean
Remarks

This value is part of the DIMAZIN variable.

| Improve this Doc View Source

SuppressAngularTrailingZeros

Suppresses trailing zeros in angular decimal dimensions. (DIMZIN)

Declaration
public bool SuppressAngularTrailingZeros { get; set; }
Property Value
Type Description
System.Boolean
Remarks

This value is part of the DIMAZIN variable.

| Improve this Doc View Source

SuppressLinearLeadingZeros

Suppresses leading zeros in linear decimal dimensions; for example, 0.5000 becomes .5000. (DIMZIN)

Declaration
public bool SuppressLinearLeadingZeros { get; set; }
Property Value
Type Description
System.Boolean
Remarks

This value is part of the DIMZIN variable.

| Improve this Doc View Source

SuppressLinearTrailingZeros

Suppresses trailing zeros in linear decimal dimensions. (DIMZIN)

Declaration
public bool SuppressLinearTrailingZeros { get; set; }
Property Value
Type Description
System.Boolean
Remarks

This value is part of the DIMZIN variable.

| Improve this Doc View Source

SuppressZeroFeet

Suppresses zero feet in architectural dimensions. (DIMZIN)

Declaration
public bool SuppressZeroFeet { get; set; }
Property Value
Type Description
System.Boolean
Remarks

This value is part of the DIMZIN variable.

| Improve this Doc View Source

SuppressZeroInches

Suppresses zero inches in architectural dimensions. (DIMZIN)

Declaration
public bool SuppressZeroInches { get; set; }
Property Value
Type Description
System.Boolean
Remarks

This value is part of the DIMZIN variable.

| Improve this Doc View Source

TextColor

Gets or set the color of dimension text. (DIMCLRT)

Declaration
public AciColor TextColor { get; set; }
Property Value
Type Description
AciColor
Remarks

Default: ByBlock
Only indexed AciColors are supported.

| Improve this Doc View Source

TextDirection

Gets or sets the direction of the dimension text. (DIMTXTDIRECTION)

Declaration
public DimensionStyleTextDirection TextDirection { get; set; }
Property Value
Type Description
DimensionStyleTextDirection
Remarks

Default: LeftToRight

| Improve this Doc View Source

TextFillColor

Gets or set the background color of dimension text. Set to null to specify no color. (DIMTFILLCLR)

Declaration
public AciColor TextFillColor { get; set; }
Property Value
Type Description
AciColor
Remarks

Default: null
Only indexed AciColors are supported.

| Improve this Doc View Source

TextFractionHeightScale

Gets or sets the scale of fractions relative to dimension text height. (DIMTFAC)

Declaration
public double TextFractionHeightScale { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 1.0
This value is only applicable to Architectural and Fractional units, and also controls the height factor applied to the tolerance text in relation with the dimension text height.

| Improve this Doc View Source

TextHeight

Gets or sets the height of dimension text, unless the current text style has a fixed height. (DIMTXT)

Declaration
public double TextHeight { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.18

| Improve this Doc View Source

TextHorizontalPlacement

Gets or sets the horizontal positioning of dimension text. (DIMJUST)

Declaration
public DimensionStyleTextHorizontalPlacement TextHorizontalPlacement { get; set; }
Property Value
Type Description
DimensionStyleTextHorizontalPlacement
Remarks

Default: Centered

| Improve this Doc View Source

TextInsideAlign

Gets or sets the positioning of the dimension text inside extension lines. (DIMTIH)

Declaration
public bool TextInsideAlign { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false

| Improve this Doc View Source

TextOffset

Gets or sets the distance around the dimension text when the dimension line breaks to accommodate dimension text. (DIMGAP)

Declaration
public double TextOffset { get; set; }
Property Value
Type Description
System.Double
Remarks

Default: 0.09
Displays a rectangular frame around the dimension text when negative values are used.

| Improve this Doc View Source

TextOutsideAlign

Gets or sets the positioning of the dimension text outside extension lines. (DIMTOH)

Declaration
public bool TextOutsideAlign { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default: false

| Improve this Doc View Source

TextStyle

Gets or sets the text style of the dimension. (DIMTXTSTY)

Declaration
public TextStyle TextStyle { get; set; }
Property Value
Type Description
TextStyle
Remarks

Default: Standard

| Improve this Doc View Source

TextVerticalPlacement

Gets or sets the vertical position of text in relation to the dimension line. (DIMTAD)

Declaration
public DimensionStyleTextVerticalPlacement TextVerticalPlacement { get; set; }
Property Value
Type Description
DimensionStyleTextVerticalPlacement
Remarks

Default: Centered

| Improve this Doc View Source

Tolerances

Gets or sets the tolerances format for dimensions.

Declaration
public DimensionStyleTolerances Tolerances { get; set; }
Property Value
Type Description
DimensionStyleTolerances

Methods

| Improve this Doc View Source

Clone()

Creates a new DimensionStyle that is a copy of the current instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new DimensionStyle that is a copy of this instance.

Overrides
TableObject.Clone()
| Improve this Doc View Source

Clone(String)

Creates a new DimensionStyle that is a copy of the current instance.

Declaration
public override TableObject Clone(string newName)
Parameters
Type Name Description
System.String newName

DimensionStyle name of the copy.

Returns
Type Description
TableObject

A new DimensionStyle that is a copy of this instance.

Overrides
TableObject.Clone(String)
| Improve this Doc View Source

OnBlockChangedEvent(Block, Block)

Declaration
protected virtual Block OnBlockChangedEvent(Block oldBlock, Block newBlock)
Parameters
Type Name Description
Block oldBlock
Block newBlock
Returns
Type Description
Block
| Improve this Doc View Source

OnLinetypeChangedEvent(Linetype, Linetype)

Declaration
protected virtual Linetype OnLinetypeChangedEvent(Linetype oldLinetype, Linetype newLinetype)
Parameters
Type Name Description
Linetype oldLinetype
Linetype newLinetype
Returns
Type Description
Linetype
| Improve this Doc View Source

OnTextStyleChangedEvent(TextStyle, TextStyle)

Declaration
protected virtual TextStyle OnTextStyleChangedEvent(TextStyle oldTextStyle, TextStyle newTextStyle)
Parameters
Type Name Description
TextStyle oldTextStyle
TextStyle newTextStyle
Returns
Type Description
TextStyle

Events

| Improve this Doc View Source

BlockChanged

Declaration
public event DimensionStyle.BlockChangedEventHandler BlockChanged
Event Type
Type Description
DimensionStyle.BlockChangedEventHandler
| Improve this Doc View Source

LinetypeChanged

Declaration
public event DimensionStyle.LinetypeChangedEventHandler LinetypeChanged
Event Type
Type Description
DimensionStyle.LinetypeChangedEventHandler
| Improve this Doc View Source

TextStyleChanged

Declaration
public event DimensionStyle.TextStyleChangedEventHandler TextStyleChanged
Event Type
Type Description
DimensionStyle.TextStyleChangedEventHandler

Implements

IHasXData
System.ICloneable
System.IComparable
System.IComparable<T>
System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX