Skip to content

TextRange

Public Class

An object that is used to identify a range of characters in a FormattedText.

Inheritance Hierarchy

System.Object
Autodesk.Revit.DB.TextRange

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

Name

Description


Public Method
TextRange.

Constructs a TextRange with default values for start and length.


Public Method
TextRange(TextRange)

Constructs a copy of the input TextRange object.


Public Method
TextRange(Int32, Int32)

Constructs a TextRange with input start and length.


Properties

Name

Description


Public Property

The index of the first character after the end of the range


Public Property
IsValidObject

Specifies whether the .NET object represents a valid Revit entity.


Public Property

The length of the range.


Public Property

The start index of a range within the FormattedText.


Methods

Name

Description


Public Method

Releases all resources used by the TextRange


Public Method

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)


Public Method

GetHashCode

Serves as the default hash function.
(Inherited from Object)


Public Method

GetType

Gets the Type of the current instance.
(Inherited from Object)


Public Method

ToString

Returns a string that represents the current object.
(Inherited from Object)


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.