Creates a new TextNote object without a leader.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- pView
- Type: Autodesk.Revit.DB View
The view where the text note object will be visible.
- origin
- Type: Autodesk.Revit.DB XYZ
The origin of the text note.
- baseVec
- Type: Autodesk.Revit.DB XYZ
The horizontal direction for text in the text note.
- upVec
- Type: Autodesk.Revit.DB XYZ
The vertical direction for text in the text note.
- lineWidth
- Type: System Double
The width of the rectangle bounding the note text.
- textAlign
- Type: Autodesk.Revit.DB TextAlignFlags
Flags indicating the alignment of the note. This should be a bitwise OR including one of TEF_ALIGN_TOP, TEF_ALIGN_MIDDLE and TEF_ALIGN_BOTTOM and one of TEF_ALIGN_LEFT, TEF_ALIGN_CENTER and TEF_ALIGN_RIGHT. The defaults for this flag are TEF_ALIGN_TOP | TEF_ALIGN_LEFT.
- strText
- Type: System String
Text to display in the text note. Include new line characters to force a multiple line note to be created. Notes may also wrap automatically based on the width of the note rectangle.
Return Value
If successful, a TextNote object is returned.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentNullException | Thrown when any one of pView, origin, baseVec, upVec, strText is a null reference ( Nothing in Visual Basic) . |
Autodesk.Revit.Exceptions ArgumentException | Thrown when the input lineWidth is not a finite number. |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | Thrown when the input textAlign is not a valid TextAlignFlags or it is not a valid bitwise OR of the align flags. |
Autodesk.Revit.Exceptions InvalidOperationException | If the regeneration fails when creating the text note. |