SetIndentLevel Method


Sets the number of tab stops that the paragraph should be indented.

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

Syntax

C#
public void SetIndentLevel(
	TextRange textRange,
	int level
)
Visual Basic
Public Sub SetIndentLevel ( _
	textRange As TextRange, _
	level As Integer _
)
Visual C++
public:
void SetIndentLevel(
	TextRange^ textRange, 
	int level
)

Parameters

textRange
Type: Autodesk.Revit.DB TextRange
The given text range.
level
Type: System Int32
The level set on the paragraph.

Remarks

The indent level is the number of tab stops by which each paragraph will be indented.

Note that adjoining paragraphs that have the same indent level and have a list type other than None are considered part of a numbered list. Changing the indent level of paragraphs that are bulleted or numbered (i.e. paragraphs that have a list type other than None ) may cause other changes to the document as the changed paragraphs may join or leave a list. Which will cause the other paragraphs in those lists to be renumbered.

This function applies the nesting level to all paragraphs contained in the given range. The level set on the paragraph cannot be negative and cannot be larger than the value returned by GetMaximumIndentLevel .

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException 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. -or- This level is too large to set on a paragraph.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentOutOfRangeException The given value for level is negative.

See Also