CommandInputs.addTextBoxCommandInput Method

Parent Object: CommandInputs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a text box input to the command.

Syntax

"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addTextBoxCommandInput(id, name, formattedText, numRows, isReadOnly)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addTextBoxCommandInput(id, name, formattedText, numRows, isReadOnly);

Return Value

Type Description
TextBoxCommandInput Returns the created TextBoxCommandInput object or null if the creation failed.

Parameters

Name Type Description
id string The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name string The displayed name of this command as seen in the dialog. If an empty string is provided then no name will be displayed and the text box will span the width of the command dialog.
formattedText string Gets and sets the formatted text displayed in the dialog. Formatted text includes any basic html formatting that has been defined. For example, you can use basic html formatting such as <b>Bold</b>, <i>Italic</i>, and <br /> for a line break. It also supports hyperlinks, which when clicked by the user, Fusion 360 will open the specified URL in the default browser. Hyperlinks are defined using the <a> tag such as "You are using Autodesk's <a href="http://fusion360.autodesk.com">Fusion 360</a>.".
numRows integer Specifies the height of the text box as defined by the number of rows of text that can be displayed. If the text is larger than will fit in the box a scroll bar will automatically be displayed.
isReadOnly boolean Specifies if the text box is read-only or not.

Samples

Name Description
Command Inputs API Sample

Creates a command dialog that demonstrates all of the available command inputs.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015