Click or drag to resize

LengthValue Class

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
Inheritance Hierarchy

Namespace:  Rhino
Assembly:  RhinoCommon (in RhinoCommon.dll)
public sealed class LengthValue : IDisposable

The LengthValue type exposes the following members.

Public propertyContextAngleUnitSystem
Returns the context AngleUnitSystem from this LengthValue's ParseSettings
Public propertyContextLocaleId
returns the context LocaleId from this LengthValue
Public propertyLengthString
Return length as a string
Public propertyLengthStringFormat
Returns the StringFormat from this LengthValue
Public propertyParseSettings
Parse settings
Public propertyUnitSystem
UnitSystem used by this LengthValue
Public methodChangeLength
Changes the numeric value in a LengthValue and leaves all of the other info unchanged UnitSystem, ParseSettings and StringFormat stay as they were
Public methodChangeUnitSystem
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
Public methodStatic memberCreate(Double, UnitSystem, LengthValueStringFormat)
Create from Length and UnitSystem
Public methodStatic memberCreate(String, StringParserSettings, Boolean)
Create from string
Public methodStatic memberCreate(Double, UnitSystem, LengthValueStringFormat, UInt32)
Create from Length and UnitSystem
Public methodDispose
actively reclaim native allocated ON_LenghtValue*
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
passively reclaim native allocated ON_LenghtValue*
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsUnset
Test IsUnset
Public methodLength
Length value in this instance's current unit system
Public methodLength(UnitSystem)
Length value in a given unit system
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
See Also