SetUnderlineStatus Method (TextRange, Boolean)


Sets the characters in a given text range to be underlined or not underlined.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2017

Syntax

C#
public void SetUnderlineStatus(
	TextRange textRange,
	bool isUnderlined
)
Visual Basic
Public Sub SetUnderlineStatus ( _
	textRange As TextRange, _
	isUnderlined As Boolean _
)
Visual C++
public:
void SetUnderlineStatus(
	TextRange^ textRange, 
	bool isUnderlined
)

Parameters

textRange
Type: Autodesk.Revit.DBTextRange
The given text range.
isUnderlined
Type: SystemBoolean
The desired underline status of characters in the given text range. True to set underlined, false to set not underlined.

Remarks

Bullets, numbers, or letters of a list can not be underlined.

The given text range should not be empty.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException This text range is empty. -or- This start index of this text range is not within the text range identifying the entire text. -or- The end of this text range is not within the text range identifying the entire text.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →