Can also be considered an annotation style since it is used for more than just dimensions

Constructors

DimensionStyle

#Since v5.0
public DimensionStyle()
Create a new non-document controlled annotation style

DimensionStyle

#
protected DimensionStyle(SerializationInfo info, StreamingContext context)
info (SerializationInfo)
context (StreamingContext)

Properties

AlternateBelowLine

#Since v6.0
public bool AlternateBelowLine { get; set; }

AlternateDimensionLengthDisplay

#Since v6.0
public DimensionStyle.LengthDisplay AlternateDimensionLengthDisplay { get; set; }

AlternateLengthFactor

#Since v5.0
public double AlternateLengthFactor { get; set; }

AlternateLengthResolution

#Since v6.0
public int AlternateLengthResolution { get; set; }

AlternatePrefix

#Since v6.0
public string AlternatePrefix { get; set; }

AlternateRoundoff

#Since v6.0
public double AlternateRoundoff { get; set; }

AlternateSuffix

#Since v6.0
public string AlternateSuffix { get; set; }

AlternateToleranceResolution

#Since v6.0
public int AlternateToleranceResolution { get; set; }

AlternateUnitsDisplay

#Since v6.0
public bool AlternateUnitsDisplay { get; set; }

AlternateZeroSuppress

#Since v6.0
public DimensionStyle.ZeroSuppression AlternateZeroSuppress { get; set; }

AngleFormat

#Since v6.0
public DimensionStyle.AngleDisplayFormat AngleFormat { get; set; }

AngleResolution

#Since v5.0
public int AngleResolution { get; set; }

AngleZeroSuppress

#Since v6.0
public DimensionStyle.ZeroSuppression AngleZeroSuppress { get; set; }

AngularRoundoff

#Since v6.0
public double AngularRoundoff { get; set; }

ArcLengthSymbol

#Since v6.0
public int ArcLengthSymbol { get; set; }

ArrowBlockId1

#Since v6.0
public Guid ArrowBlockId1 { get; set; }

ArrowBlockId2

#Since v6.0
public Guid ArrowBlockId2 { get; set; }

ArrowLength

#Since v5.0
public double ArrowLength { get; set; }

ArrowType1

#Since v6.0
public DimensionStyle.ArrowType ArrowType1 { get; set; }

ArrowType2

#Since v6.0
public DimensionStyle.ArrowType ArrowType2 { get; set; }

BaselineSpacing

#Since v6.0
public double BaselineSpacing { get; set; }

CentermarkSize

#Since v5.0
public double CentermarkSize { get; set; }

CenterMarkType

#Since v6.0
public DimensionStyle.CenterMarkStyle CenterMarkType { get; set; }

ClippingArrowLength

#Since v9.0
public double ClippingArrowLength { get; set; }

ClippingArrowType1

#Since v9.0
public DimensionStyle.ClippingArrowType ClippingArrowType1 { get; set; }

ClippingArrowType2

#Since v9.0
public DimensionStyle.ClippingArrowType ClippingArrowType2 { get; set; }

ComponentStatus

public virtual ComponentStatus ComponentStatus { get; set; }
Gets or sets the component status of the model component.
inherited fromModelComponent

ComponentType

#Since v6.0
public override ModelComponentType ComponentType { get; }

DecimalSeparator

#Since v7.0
public char DecimalSeparator { get; set; }

DeletedName

public string DeletedName { get; }
Gets the name of a component that is deleted.
inherited fromModelComponent

DimensionLengthDisplay

#Since v6.0
public DimensionStyle.LengthDisplay DimensionLengthDisplay { get; set; }

DimensionLineExtension

#Since v6.0
public double DimensionLineExtension { get; set; }

DimensionScale

#Since v6.0
public double DimensionScale { get; set; }

DimensionScaleValue

#Since v6.0
public ScaleValue DimensionScaleValue { get; set; }

DimRadialTextAngleType

#Since v6.0
public DimensionStyle.LeaderContentAngleStyle DimRadialTextAngleType { get; set; }

DimRadialTextLocation

#Since v6.0
public DimensionStyle.TextLocation DimRadialTextLocation { get; set; }

DimRadialTextOrientation

#Since v6.0
public TextOrientation DimRadialTextOrientation { get; set; }

DimTextAngleType

#Since v6.0
public DimensionStyle.LeaderContentAngleStyle DimTextAngleType { get; set; }

DimTextLocation

#Since v6.0
public DimensionStyle.TextLocation DimTextLocation { get; set; }

DimTextOrientation

#Since v6.0
public TextOrientation DimTextOrientation { get; set; }

Disposed

public bool Disposed { get; }
Indicates if this object has been disposed or the document it originally belonged to has been disposed.
inherited fromCommonObject

DrawForward

#Since v6.0
public bool DrawForward { get; set; }

DrawTextMask

#Since v6.0
public bool DrawTextMask { get; set; }

ExtensionLineExtension

#Since v5.0
public double ExtensionLineExtension { get; set; }

ExtensionLineOffset

#Since v5.0
public double ExtensionLineOffset { get; set; }

FitArrow

#Since v6.20
public DimensionStyle.ArrowFit FitArrow { get; set; }

FitText

#Since v6.20
public DimensionStyle.TextFit FitText { get; set; }

FixedExtensionLength

#Since v6.0
public double FixedExtensionLength { get; set; }

FixedExtensionOn

#Since v6.0
public bool FixedExtensionOn { get; set; }

Font

#Since v6.0
public Font Font { get; set; }

ForceDimensionLineBetweenExtensionLines

#Since v6.20
public bool ForceDimensionLineBetweenExtensionLines { get; set; }

HasFieldOverrides

#Since v6.0
public bool HasFieldOverrides { get; }
Checks if any fields in this DimensionStyle are overrides
True if any fields are overrides False is no fields are overrides

HasId

public bool HasId { get; }
Returns a value indicating whether the component has an ID.
inherited fromModelComponent

HasIndex

public bool HasIndex { get; }
Returns a value indicating whether the component has an Index.
inherited fromModelComponent

HasName

public bool HasName { get; }
Returns a value indicating whether the component has a Name.
inherited fromModelComponent

HasUserData

public bool HasUserData { get; }
Gets true if this class has any custom information attached to it through UserData.
inherited fromCommonObject

Id

public virtual Guid Id { get; set; }
Gets or sets the ID of the current instance.
inherited fromModelComponent
InvalidOperationExceptionWhen setting the ID failed. This usually happened because the instance ID is already locked.

IdIsLocked

public bool IdIsLocked { get; }
Returns a value indicating whether the component ID is already locked.
inherited fromModelComponent

Index

public virtual int Index { get; set; }
Gets or sets the model component index attribute.
inherited fromModelComponent
InvalidOperationExceptionWhen setting the Index failed. This usually happens because the instance Index is already locked.

IndexIsLocked

public bool IndexIsLocked { get; }
Returns a value indicating whether the component Index is already locked.
inherited fromModelComponent

InstanceDefinitionModelSerialNumber

[CLSCompliant(false)] public virtual uint InstanceDefinitionModelSerialNumber { get; }
When a component is in a model as part of the information required for a linked instance definition, this value identifies the linked instance definition reference model.
inherited fromModelComponent
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.

IsChild

#Since v6.0
public bool IsChild { get; }
Tests if this DimensionStyle is a child of any other DimensionStyle
True if this is a child DimensionStyle, False otherwise.

IsComponentStatusLocked

public bool IsComponentStatusLocked { get; }
The component status itself can be locked. This returns an indication.
inherited fromModelComponent

IsDeleted

#Since v6.0
public override bool IsDeleted { get; }

IsDocumentControlled

public virtual bool IsDocumentControlled { get; }
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
inherited fromCommonObject

IsReference

#Since v5.0
public override bool IsReference { get; }

IsSystemComponent

public bool IsSystemComponent { get; }
True if this model component is a system constant.

An incomplete list of system constant model components is below:

  • ON_ModelComponent::Unset

  • ON_InstanceDefinition::Empty

  • ON_Linetype::Unset
  • ON_Linetype::Continuous
  • ON_Linetype::ByLayer
  • ON_Linetype::ByParent

  • ON_Layer::Unset
  • ON_Layer::Default

  • ON_TextStyle::Unset
  • ON_TextStyle::Default
  • ON_TextStyle::ByLayer
  • ON_TextStyle::ByParent

  • ON_DimStyle::Unset
  • ON_DimStyle::Default
  • ON_DimStyle::DefaultInchDecimal
  • ON_DimStyle::DefaultInchFractional
  • ON_DimStyle::DefaultFootInchArchitecture
  • ON_DimStyle::DefaultMillimeterSmall
  • ON_DimStyle::DefaultMillimeterLarge
  • ON_DimStyle::DefaultMillimeterArchitecture
inherited fromModelComponent

IsValid

public virtual bool IsValid { get; }
Tests an object to see if it is valid.
inherited fromCommonObject

LeaderArrowBlockId

#Since v6.0
public Guid LeaderArrowBlockId { get; set; }

LeaderArrowLength

#Since v5.0
public double LeaderArrowLength { get; set; }

LeaderArrowType

#Since v5.6
public DimensionStyle.ArrowType LeaderArrowType { get; set; }

LeaderContentAngleType

#Since v6.0
public DimensionStyle.LeaderContentAngleStyle LeaderContentAngleType { get; set; }
Style of leader content angle Horizontal Aligned Rotated

LeaderCurveType

#Since v6.0
public DimensionStyle.LeaderCurveStyle LeaderCurveType { get; set; }

LeaderHasLanding

#Since v6.0
public bool LeaderHasLanding { get; set; }

LeaderLandingLength

#Since v6.0
public double LeaderLandingLength { get; set; }

LeaderTextHorizontalAlignment

#Since v6.0
public TextHorizontalAlignment LeaderTextHorizontalAlignment { get; set; }

LeaderTextOrientation

#Since v6.0
public TextOrientation LeaderTextOrientation { get; set; }

LeaderTextRotationDegrees

#Since v6.0
public double LeaderTextRotationDegrees { get; set; }

LeaderTextRotationRadians

#Since v6.0
public double LeaderTextRotationRadians { get; set; }
Angle of leader text for Rotated style

LeaderTextVerticalAlignment

#Since v6.0
public TextVerticalAlignment LeaderTextVerticalAlignment { get; set; }

LengthFactor

#Since v5.0
public double LengthFactor { get; set; }

LengthResolution

#Since v5.0
public int LengthResolution { get; set; }

LineSpaceScale

#Since v9.0
public double LineSpaceScale { get; set; }

MaskColor

#Since v6.0
public Color MaskColor { get; set; }

MaskColorSource

#Since v6.0
public DimensionStyle.MaskType MaskColorSource { get; set; }

MaskFrameType

#Since v7.0
public DimensionStyle.MaskFrame MaskFrameType { get; set; }

MaskOffset

#Since v6.0
public double MaskOffset { get; set; }

ModelSerialNumber

[CLSCompliant(false)] public virtual uint ModelSerialNumber { get; }
A value identifying the model that manages this component.
inherited fromModelComponent
Remarks: If the component is being managed by a model, this value identifies the model. In Rhino, this value is the document runtime serial number. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.

Name

public virtual string Name { get; set; }
Gets or sets the name
inherited fromModelComponent
InvalidOperationExceptionWhen setting the Name failed. This usually happens because the instance Name is already locked.

NameIsLocked

public bool NameIsLocked { get; }
Returns a value indicating whether the component Name is already locked.
inherited fromModelComponent

ParentId

#Since v6.0
public Guid ParentId { get; set; }
Get or Set the Id of this DimensionStyle's parent. If ParentId is Guid.Empty, this DimensionStyle has no parent

Prefix

#Since v5.0
public string Prefix { get; set; }

ReferenceModelSerialNumber

[CLSCompliant(false)] public virtual uint ReferenceModelSerialNumber { get; }
When a component is in a model for reference, this value identifies the reference model.
inherited fromModelComponent
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.

Roundoff

#Since v6.0
public double Roundoff { get; set; }

ScaleLeftLengthMillimeters

#Since v6.0
public double ScaleLeftLengthMillimeters { get; set; }

ScaleRightLengthMillimeters

#Since v6.0
public double ScaleRightLengthMillimeters { get; set; }

StackFractionFormat

#Since v6.0
public DimensionStyle.StackDisplayFormat StackFractionFormat { get; set; }

StackHeightScale

#Since v6.0
public double StackHeightScale { get; set; }

Suffix

#Since v5.0
public string Suffix { get; set; }

SuppressArrow1

#Since v6.0
public bool SuppressArrow1 { get; set; }

SuppressArrow2

#Since v6.0
public bool SuppressArrow2 { get; set; }

SuppressDimensionLine1

#Since v9.0
public bool SuppressDimensionLine1 { get; set; }
Suppresses the dimension line and arrowhead between the first extension line and the dimension text.

SuppressDimensionLine2

#Since v9.0
public bool SuppressDimensionLine2 { get; set; }
Suppresses the dimension line and arrowhead between the second extension line and the dimension text.

SuppressExtension1

#Since v6.0
public bool SuppressExtension1 { get; set; }

SuppressExtension2

#Since v6.0
public bool SuppressExtension2 { get; set; }

TextGap

#Since v5.0
public double TextGap { get; set; }

TextHeight

#Since v5.0
public double TextHeight { get; set; }

TextHorizontalAlignment

#Since v6.0
public TextHorizontalAlignment TextHorizontalAlignment { get; set; }

TextMoveLeader

#Since v6.0
public int TextMoveLeader { get; set; }

TextOrientation

#Since v6.0
public TextOrientation TextOrientation { get; set; }

TextRotation

#Since v6.0
public double TextRotation { get; set; }

TextUnderlined

#Since v6.0
public bool TextUnderlined { get; set; }

TextVerticalAlignment

#Since v6.0
public TextVerticalAlignment TextVerticalAlignment { get; set; }

ToleranceFormat

#Since v6.0
public DimensionStyle.ToleranceDisplayFormat ToleranceFormat { get; set; }

ToleranceHeightScale

#Since v6.0
public double ToleranceHeightScale { get; set; }

ToleranceLowerValue

#Since v6.0
public double ToleranceLowerValue { get; set; }

ToleranceResolution

#Since v6.0
public int ToleranceResolution { get; set; }

ToleranceUpperValue

#Since v6.0
public double ToleranceUpperValue { get; set; }

ToleranceZeroSuppress

#Since v6.0
public DimensionStyle.ZeroSuppression ToleranceZeroSuppress { get; set; }

UnitSystem

#Since v8.36
public UnitSystem UnitSystem { get; set; }
The dimension style's own unit system. This is what the style's lengths - text height, arrow size and so on - are expressed in, and openNURBS uses it internally to get scales right when annotation moves between model space, page space and instance definitions whose unit systems differ. A style that reports UnitSystem.None has no unit system of its own, and unknown scales resolve to 1.

UseKerning

#Since v9.0
public bool UseKerning { get; set; }

UserData

public UserDataList UserData { get; }
List of custom information that is attached to this class.
inherited fromCommonObject

UserDictionary

public ArchivableDictionary UserDictionary { get; }
Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.
inherited fromCommonObject

UserStringCount

#Since v8.9
public int UserStringCount { get; }
Gets the amount of user strings.

ZeroSuppress

#Since v6.0
public DimensionStyle.ZeroSuppression ZeroSuppress { get; set; }

Methods

AlternateDimensionLengthDisplayUnit

#Since v6.0
[CLSCompliant(false)] public UnitSystem AlternateDimensionLengthDisplayUnit(uint model_serial_number)
model_serial_number (uint)

ClearAllFieldOverrides

#Since v6.0
public void ClearAllFieldOverrides()
Sets all the fields in this DimensionStyle to be not overridden Does not change any dimstyle_id's or parent_id's

ClearFieldOverride

#Since v6.0
public void ClearFieldOverride(Field field)
Set the field as not overridden
field (DimensionStyle.Field)

ClearId

public void ClearId()
Resets the HasId property of the model component to false, if possible.
inherited fromModelComponent
InvalidOperationExceptionIf the ID is locked.

ClearIndex

public void ClearIndex()
Resets the HasIndex property of the model component to false, if possible.
inherited fromModelComponent
InvalidOperationExceptionIf the index is locked.

ClearName

public void ClearName()
Resets the HasName property of the model component to false, if possible.
inherited fromModelComponent
InvalidOperationExceptionIf the name is locked.

ConstructConstObject

protected void ConstructConstObject(object parentObject, int subobjectIndex)
Assigns a parent object and a sub-object index to this.
inherited fromCommonObject
parentObject (object)The parent object.
subobjectIndex (int)The sub-object index.

CopyFrom

#Since v6.0
public void CopyFrom(DimensionStyle source)
Copy settings from source dimension style without changing the name, Id or index of this DimensionStyle.
source (DimensionStyle)DimensionStyle to copy settings from.

CreatePreviewBitmap

#Since v9.0
public Bitmap CreatePreviewBitmap(int width, int height, bool transparent)
width (int)
height (int)
transparent (bool)

CreatePreviewBitmap

#Since v6.0
public Bitmap CreatePreviewBitmap(int width, int height)
width (int)
height (int)

DataCRC

[CLSCompliant(false)] public uint DataCRC(uint currentRemainder)
Increments the Cyclic Redundancy Check value by this instance.
inherited fromModelComponent
currentRemainder (uint)The current remainder value.
The updated remainder value.

DeleteAllUserStrings

#Since v8.9
public void DeleteAllUserStrings()

DeleteUserString

#Since v8.9
public bool DeleteUserString(string key)
key (string)

DimensionLengthDisplayUnit

#Since v6.0
[CLSCompliant(false)] public UnitSystem DimensionLengthDisplayUnit(uint model_serial_number)
model_serial_number (uint)

Dispose

public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
inherited fromCommonObject

Dispose

protected virtual void Dispose(bool disposing)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

inherited fromCommonObject
disposing (bool)true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.

Duplicate

#Since v6.0
public DimensionStyle Duplicate()
Construct a deep (full) copy of this object.
An object of the same type as this, with the same properties and behavior.

Duplicate

#Since v6.0
public DimensionStyle Duplicate(string newName, Guid newId, Guid newParentId)
Construct a deep (full) copy of this object.
newName (string)
newId (Guid)
newParentId (Guid)
An object of the same type as this, with the same properties and behavior.

EnsurePrivateCopy

public void EnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
inherited fromCommonObject

GetObjectData

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
inherited fromCommonObject
info (SerializationInfo)The System.Runtime.Serialization.SerializationInfo to populate with data.
context (StreamingContext)The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

GetUserString

#Since v8.9
public string GetUserString(string key)
Gets user string from this geometry.
key (string)id used to retrieve the string.
string associated with the key if successful. null if no key was found.

GetUserStrings

#Since v8.9
public NameValueCollection GetUserStrings()
Gets a copy of all (user key string, user value string) pairs attached to this geometry.
A new collection.

IsChildOf

#Since v6.0
public bool IsChildOf(Guid parentId)
Tests if this DimensionStyle is a child of a specific DimensionStyle
parentId (Guid)
True if this is a child of the DimensionStyle with Parent False otherwise.

IsFieldOverriden

#
public bool IsFieldOverriden(Field field)
field (DimensionStyle.Field)

IsValidWithLog

public bool IsValidWithLog(out string log)
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
inherited fromCommonObject
log (out string)A textual log. This out parameter is assigned during this call.
true if this object is valid; false otherwise.

LockId

public void LockId()
Locks the component Id property.
inherited fromModelComponent

LockIndex

public void LockIndex()
Locks the component Index property.
inherited fromModelComponent

LockName

public void LockName()
Locks the component Name property.
inherited fromModelComponent

NonConstOperation

protected virtual void NonConstOperation()
For derived classes implementers.

Defines the necessary implementation to free the instance from being constant.

inherited fromCommonObject

OnSwitchToNonConst

protected virtual void OnSwitchToNonConst()
Is called when a non-constant operation first occurs.
inherited fromCommonObject

ScaleLengthValues

#Since v6.0
public void ScaleLengthValues(double scale)
Scales all length values by 'scale'
scale (double)

SetFieldOverride

#Since v6.0
public void SetFieldOverride(Field field)
Set a field as overridden
field (DimensionStyle.Field)

SetUserString

#Since v8.9
public bool SetUserString(string key, string value)
Attach a user string (key,value combination) to this geometry.
key (string)id used to retrieve this string.
value (string)string associated with key.
true on success.

ToJSON

public string ToJSON(SerializationOptions options)
Create a JSON string representation of this object
inherited fromCommonObject
options (SerializationOptions)

ToString

public override string ToString()
Returns the name of the model component type, and then its name and index.
inherited fromModelComponent
Remarks: This is provided as a visual aid. Do not rely on this for serialization.
Object.ToString