Creates a new text note with a single 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.
- leaderType
- Type: Autodesk.Revit.DB TextNoteLeaderTypes
The type and alignment of the leader for the note.
- leaderStyle
- Type: Autodesk.Revit.DB TextNoteLeaderStyles
The style of the leader for the note.
- leaderEnd
- Type: Autodesk.Revit.DB XYZ
The end point for the leader.
- leaderElbow
- Type: Autodesk.Revit.DB XYZ
The elbow point for the leader.
- 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 (1) Any one of pView, origin, baseVec, upVec, strText is a null reference ( Nothing in Visual Basic) . (2)leaderEnd is a null reference ( Nothing in Visual Basic) when leaderStyle != Autodesk::Revit::DB::TextNoteLeaderStyles::LCS_NONE. (3)leaderElbow is a null reference ( Nothing in Visual Basic) when leaderStyle == Autodesk::Revit::DB::TextNoteLeaderStyles::LCS_TWO_SEG_LINE. |
Autodesk.Revit.Exceptions ArgumentException | Thrown when lineWidth is not a finite number. |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | Thrown when (1) textAlign is not a valid TextAlignFlags or it is not a valid bitwise OR of TextAlignFlags . (2) leaderStyle is not a valid TextNoteLeaderTypes or leaderType is not a valid TextNoteLeaderTypes when leaderStyle != Autodesk::Revit::DB::TextNoteLeaderStyles::LCS_NONE |
Autodesk.Revit.Exceptions InvalidOperationException | If the regeneration fails when creating the text note. |