SetIndentLevel Method


Formatted Text Set Indent Level Method

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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void SetIndentLevel(
	TextRange textRange,
	int level
)

Parameters

textRange TextRange
The given text range.
level Int32
The level set on the paragraph.
Exceptions
Exception Condition
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.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException The given value for level is negative.
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 .

See Also