TextRange Class

An object that is used to identify a range of characters in a FormattedText.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBTextRange

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class TextRange : IDisposable

The TextRange type exposes the following members.

Constructors
 NameDescription
Public methodTextRange Constructs a TextRange with default values for start and length.
Public methodTextRange(TextRange) Constructs a copy of the input TextRange object.
Public methodTextRange(Int32, Int32) Constructs a TextRange with input start and length.
Top
Properties
 NameDescription
Public propertyEnd The index of the first character after the end of the range
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyLength The length of the range.
Public propertyStart The start index of a range within the FormattedText.
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the TextRange
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
A TextRange consists of a start, which is a zero-based index into the text, and a length, which is the number of characters in the range. The length can be zero.
See Also