UserInterface.commandDefinitions Property

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

Description

Gets all of the command definitions currently defined. This is all command definitions both internal and those defined through the API.

Syntax

"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.commandDefinitions
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<CommandDefinitions> propertyValue = userInterface_var->commandDefinitions();

Property Value

This is a read only property whose value is a CommandDefinitions.

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.

Custom Event Sample Demonstrates the ability to call into the main thread from a worker thread. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.
Customizing the UI using the API Sample Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014