FamilyItemFactoryNewModelText Method |
Create a model text in the Autodesk Revit family document.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic ModelText NewModelText(
string text,
ModelTextType modelTextType,
SketchPlane sketchPlane,
XYZ position,
HorizontalAlign horizontalAlign,
double depth
)
Public Function NewModelText (
text As String,
modelTextType As ModelTextType,
sketchPlane As SketchPlane,
position As XYZ,
horizontalAlign As HorizontalAlign,
depth As Double
) As ModelText
public:
ModelText^ NewModelText(
String^ text,
ModelTextType^ modelTextType,
SketchPlane^ sketchPlane,
XYZ^ position,
HorizontalAlign horizontalAlign,
double depth
)
member NewModelText :
text : string *
modelTextType : ModelTextType *
sketchPlane : SketchPlane *
position : XYZ *
horizontalAlign : HorizontalAlign *
depth : float -> ModelText
Parameters
- text String
- The text to be displayed.
- modelTextType ModelTextType
-
The type of model text. If this parameter is , the default type will be used.
- sketchPlane SketchPlane
-
The sketch plane of the model text. The direction of model text is determined by the normal of the sketch plane.
To extrude in the other direction set the depth value to negative.
- position XYZ
- The position of the model text. The position must lie in the sketch plane.
- horizontalAlign HorizontalAlign
- The horizontal alignment.
- depth Double
- The depth of the model text.
Return Value
ModelTextIf successful, the newly created model text is returned, otherwise an
exception with error information will be thrown.
Exceptions
See Also