Texts.add Method

Parent Object: Texts

PreviewThis functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.


Defined in namespace "adsk::drawing" and the header file is <Drawing/Notes/Texts.h>

Description

Creates a text block on this sheet. Mirrors the Text command: the text is placed inside a fixed-size box whose top-left corner is at placementPoint, formatted with document defaults, and committed without leaving an editing session open.

Syntax

"texts_var" is a variable referencing a Texts object.

returnValue = texts_var.add(input)
"texts_var" is a variable referencing a Texts object.

#include <Drawing/Notes/Texts.h>

returnValue = texts_var->add(input);
"texts_var" is a variable referencing a Texts object.

returnValue = texts_var.add(input);

Return Value

Type Description
Text Returns the newly created text block, or null if the operation failed - for example when the input text is empty or placementPoint is invalid.

Parameters

Name Type Description
input TextInput A TextInput created using createInput.

Version

Introduced in version November 2026