Class DimensionStyle
Represents a dimension style.
Implements
Inherited Members
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class DimensionStyle : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>
Constructors
| Improve this Doc View SourceDimensionStyle(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 SourceDefaultName
Default dimension style name.
Declaration
public const string DefaultName = "Standard"
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
| Improve this Doc View SourceAlternateUnits
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.
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.
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
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.
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: "."
Default
Gets the default dimension style.
Declaration
public static DimensionStyle Default { get; }
Property Value
| Type | Description |
|---|---|
| DimensionStyle |
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
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.
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.
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.
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
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.
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.
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.
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
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
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
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
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.
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.
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.
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
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
ExtLine1Off
Suppresses display of the first extension line. (DIMSE1)
Declaration
public bool ExtLine1Off { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Default: false
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
ExtLine2Off
Suppresses display of the second extension line. (DIMSE2)
Declaration
public bool ExtLine2Off { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Default: false
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.
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
ExtLineFixed
Enables fixed length extension lines. (DIMFXLON)
Declaration
public bool ExtLineFixed { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Default: false
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
ExtLineLineweight
Gets or sets line weight of extension lines. (DIMLWE)
Declaration
public Lineweight ExtLineLineweight { get; set; }
Property Value
| Type | Description |
|---|---|
| Lineweight |
Remarks
Default: ByBlock
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
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
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.
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.
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
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
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)
Iso25
Gets the ISO-25 dimension style as defined in AutoCad.
Declaration
public static DimensionStyle Iso25 { get; }
Property Value
| Type | Description |
|---|---|
| DimensionStyle |
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.
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.
Owner
Gets the owner of the actual dimension style.
Declaration
public DimensionStyles Owner { get; }
Property Value
| Type | Description |
|---|---|
| DimensionStyles |
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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
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
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
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.
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
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
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
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 SourceClone()
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
| Improve this Doc View SourceClone(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
| Improve this Doc View SourceOnBlockChangedEvent(Block, Block)
Declaration
protected virtual Block OnBlockChangedEvent(Block oldBlock, Block newBlock)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | oldBlock | |
| Block | newBlock |
Returns
| Type | Description |
|---|---|
| Block |
OnLinetypeChangedEvent(Linetype, Linetype)
Declaration
protected virtual Linetype OnLinetypeChangedEvent(Linetype oldLinetype, Linetype newLinetype)
Parameters
| Type | Name | Description |
|---|---|---|
| Linetype | oldLinetype | |
| Linetype | newLinetype |
Returns
| Type | Description |
|---|---|
| Linetype |
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 SourceBlockChanged
Declaration
public event DimensionStyle.BlockChangedEventHandler BlockChanged
Event Type
| Type | Description |
|---|---|
| DimensionStyle.BlockChangedEventHandler |
LinetypeChanged
Declaration
public event DimensionStyle.LinetypeChangedEventHandler LinetypeChanged
Event Type
| Type | Description |
|---|---|
| DimensionStyle.LinetypeChangedEventHandler |
TextStyleChanged
Declaration
public event DimensionStyle.TextStyleChangedEventHandler TextStyleChanged
Event Type
| Type | Description |
|---|---|
| DimensionStyle.TextStyleChangedEventHandler |