UsePlusPrefix Property


Indicates if a plus sign prefix should be displayed for positive and zero values.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2014

Syntax

C#
public bool UsePlusPrefix { get; set; }
Visual Basic
Public Property UsePlusPrefix As Boolean
	Get
	Set
Visual C++
public:
property bool UsePlusPrefix {
	bool get ();
	void set (bool value);
}

Field Value

True if a plus prefix should be displayed, false otherwise. The default is false.

Remarks

This property is applicable to length display units (e.g. meters or feet). It is not currently supported for other unit types like area or force. The UI also does not permit it to be enabled in the Units class that represents the document's default settings, but that restriction is not enforced in the API.

When UsePlusPrefix is true, a plus sign ("+") will be displayed before positive and zero values, just as a minus sign ("-") is displayed before negative values. For example, 1.234 will be displayed as +1.234 and 0.0 will be displayed as +0.0.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException UseDefault is true in this FormatOptions. -or- When setting this property: UsePlusPrefix was set to true but a plus prefix cannot be displayed for the display unit in this FormatOptions.

See Also