SketchTexts.createInput2 Method

Parent Object: SketchTexts
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

Creates a SketchTextInput object that is used to define the additional input to create text. The SketchTextInput object is equivalent to the Sketch Text dialog in that it collects all of the input required to create sketch text. You must call setAsFitOnPath, setAsAlongPath, or setAsMultiLine methods to define one of the three types of text and can use other and define any setAs Once the properties of the SketchTextInput object have been defined, use the add method to create the sketch text.

Syntax

"sketchTexts_var" is a variable referencing a SketchTexts object.
returnValue = sketchTexts_var.createInput2(formattedText, height)
"sketchTexts_var" is a variable referencing a SketchTexts object.

#include <Fusion/Sketch/SketchTexts.h>

returnValue = sketchTexts_var->createInput2(formattedText, height);

Return Value

Type Description
SketchTextInput Returns a SketchTextInput object that can be used to set additional formatting and is used as input to the add method.

Parameters

Name Type Description
formattedText string The text used for the sketch text. This is a simple string as no additional formatting is currently supported.
height double The height of the text in centimeters.

Samples

Name Description
SketchTextInput.setAsAlongPath Demonstrates the SketchTextInput.setAsAlongPath method.
SketchTextInput.setAsFitOnPath Demoonstrates the SketchTextInput.setAsFitOnPath method.
SketchTextInput.setAsMultiLine Demonstrates the SketchTextInput.setAsMultiLine method.
Sketch Text API Sample Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version December 2020