LengthValue

References
public sealed class LengthValue : IDisposable
Represents a length with an associated unit system and a string representation of that length. This allows for going back and forth from numerical representation of a length and a string representation without "guessing" at the initial string

Finalizer

~LengthValue

#
~LengthValue()
passively reclaim native allocated ON_LengthValue*

Properties

ContextAngleUnitSystem

#Since v6.0
public AngleUnitSystem ContextAngleUnitSystem { get; }
Returns the context AngleUnitSystem from this LengthValue's ParseSettings

ContextLocaleId

#Since v6.0
[CLSCompliant(false)] public uint ContextLocaleId { get; }
returns the context LocaleId from this LengthValue

LengthString

#Since v6.0
public string LengthString { get; }
Return length as a string

LengthStringFormat

#Since v6.0
public LengthValue.StringFormat LengthStringFormat { get; }
Returns the StringFormat from this LengthValue

ParseSettings

#Since v6.0
public StringParserSettings ParseSettings { get; }
Parse settings

Units

#Since v9.0
public LengthUnit Units { get; }
LengthUnit used by this LengthValue

UnitSystem

#Since v6.0
public UnitSystem UnitSystem { get; }
UnitSystem used by this LengthValue

Methods

ChangeLength

#Since v6.0
public LengthValue ChangeLength(double newLength)
Changes the numeric value in a LengthValue and leaves all of the other info unchanged UnitSystem, ParseSettings and StringFormat stay as they were
newLength (double)
A new LengthValue

ChangeUnits

#Since v9.0
public LengthValue ChangeUnits(LengthUnit newUnits)
Change the UnitSystem of a LengthValue The numeric value of Length is scaled by new_us / current unit system so that the absolute length stays the same
newUnits (LengthUnit)

ChangeUnitSystem

#Since v6.0
public LengthValue ChangeUnitSystem(UnitSystem newUnits)
Change the UnitSystem of a LengthValue The numeric value of Length is scaled by new_us / current unit system so that the absolute length stays the same
newUnits (UnitSystem)

Create

#Since v9.0
[CLSCompliant(false)] public static LengthValue Create(double length, LengthUnit units, StringFormat format, uint localeId)
Create from Length and LengthUnit
length (double)Numeric length value
units (LengthUnit)Length units
format (LengthValue.StringFormat)
localeId (uint)

Create

#Since v9.0
[CLSCompliant(false)] public static LengthValue Create(double length, LengthUnit units, StringFormat format)
Create from Length and LengthUnit
length (double)Numeric length value
units (LengthUnit)Length units
format (LengthValue.StringFormat)

Create

#Since v6.0
[CLSCompliant(false)] public static LengthValue Create(double length, UnitSystem us, StringFormat format, uint localeId)
Create from Length and UnitSystem
length (double)Numeric length value
us (UnitSystem)Unit system
format (LengthValue.StringFormat)
localeId (uint)

Create

#Since v6.0
public static LengthValue Create(double length, UnitSystem us, StringFormat format)
Create from Length and UnitSystem
length (double)Numeric length value
us (UnitSystem)Unit system
format (LengthValue.StringFormat)

Create

#Since v6.0
public static LengthValue Create(string s, StringParserSettings ps, out bool parsedAll)
Create from string
s (string)string to parse
ps (StringParserSettings)
parsedAll (out bool)true if the whole string was parsed

Dispose

#Since v6.0
public void Dispose()
actively reclaim native allocated ON_LengthValue*

IsUnset

#Since v6.0
public bool IsUnset()
Test IsUnset

Length

#Since v6.0
public double Length()
Length value in this instance's current unit system

Length

#Since v9.0
public double Length(LengthUnit units)
Length value in a given unit system
units (LengthUnit)

Length

#Since v6.0
public double Length(UnitSystem units)
Length value in a given unit system
units (UnitSystem)