Revit 2026 API
Text |
An object that is used to identify a range of characters in a
FormattedText.

SystemObject
Autodesk.Revit.DBTextRange
Autodesk.Revit.DBTextRange
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
The TextRange type exposes the following members.

Name | Description | |
---|---|---|
![]() | TextRange | Constructs a TextRange with default values for start and length. |
![]() | TextRange(TextRange) | Constructs a copy of the input TextRange object. |
![]() | TextRange(Int32, Int32) | Constructs a TextRange with input start and length. |

Name | Description | |
---|---|---|
![]() | End | The index of the first character after the end of the range |
![]() | IsValidObject | Specifies whether the .NET object represents a valid Revit entity. |
![]() | Length | The length of the range. |
![]() | Start | The start index of a range within the FormattedText. |

Name | Description | |
---|---|---|
![]() | Dispose | Releases all resources used by the TextRange |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object) |

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