Width of the area of the text content.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2016
Syntax
C# |
---|
public double Width { get; set; } |
Visual Basic |
---|
Public Property Width As Double Get Set |
Visual C++ |
---|
public: property double Width { double get (); void set (double value); } |
Remarks
This property supersedes the older [!:LineWidth] property which has been deprecated.
The value is in sheet units, meaning it is as when measured on a printed sheet. The measurement is of the text content only; the border around it (if specified) is excluded.
For a text element which does is set not to use text wrapping the width is calculated to fit the longest line (a single line, typically) of the text. A setting the width explicitly by assigning value to this property will automatically activate text-wrapping for the element.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | When setting this property: The given width is not valid. A valid value must be within the range returned by the methods GetMinimumAllowedWidth and GetMaximumAllowedWidth. |