Your Ad Here

Go to: Synopsis. Flags. Return value.

Synopsis

runTimeCommand( name , [query=boolean], [edit=boolean], [exists=boolean], [command=string], [annotation=string], [category=string], [categoryArray=boolean], [default=boolean], [numberOfCommands=boolean], [numberOfDefaultCommands=boolean], [numberOfUserCommands=boolean], [commandArray=boolean], [defaultCommandArray=boolean], [userCommandArray=boolean], [save=boolean], [delete=boolean])

runTimeCommand is undoable, queryable, and editable.

Create a command given the specified name. Once the command is created you can invoke it like any other command. When the command is invoked it will execute the string attached to the -command flag.

Note that the resulting command takes no arguments, has no flags and may not be queried or edited.

The command name you provide must be unique. The name itself must begin with an alphabetic character or underscore followed by alphanumeric characters or underscores.

If you create your run time commands in a script which is automatically sourced at startup then set the -default flag to true. This will prevent the application from attempting to save these commands.

Flags

annotation, category, categoryArray, command, commandArray, default, defaultCommandArray, delete, edit, exists, numberOfCommands, numberOfDefaultCommands, numberOfUserCommands, query, save, userCommandArray
Long name (short name) [argument types] Properties
query(q) boolean query
Puts the command in query mode so that it will return the value of the specified flag.

In query mode, this flag needs a value.

edit(e) boolean edit
Puts the command in edit mode so that it will change the values of the specified flags.
exists(ex) boolean create
Returns true|false depending upon whether the specified object exists. Other flags are ignored.
command(c) string createqueryedit
Command to be executed when runTimeCommand is invoked.

In query mode, this flag needs a value.

annotation(ann) string createqueryedit
Description of the command.

In query mode, this flag needs a value.

category(cat) string createqueryedit
Category for the command.

In query mode, this flag needs a value.

categoryArray(caa) boolean query
Return all the run time command categories.

In query mode, this flag needs a value.

default(d) boolean createquery
Indicate that this run time command is a default command. Default run time commands will not be saved to preferences.

In query mode, this flag needs a value.

numberOfCommands(nc) boolean query
Return the number of run time commands.

In query mode, this flag needs a value.

numberOfDefaultCommands(ndc) boolean query
Return the number of default run time commands.

In query mode, this flag needs a value.

numberOfUserCommands(nuc) boolean query
Return the number of user run time commands.

In query mode, this flag needs a value.

commandArray(ca) boolean query
Returns an string array containing the names of all the run time commands.

In query mode, this flag needs a value.

defaultCommandArray(dca) boolean query
Returns an string array containing the names of all the default run time commands.

In query mode, this flag needs a value.

userCommandArray(uca) boolean query
Returns an string array containing the names of all the user run time commands.

In query mode, this flag needs a value.

save(s) boolean edit
Save all the user run time commands.
delete(delete) boolean edit
Delete the specified user run time command.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Multiple argument allowed, passed as an array

Return value


The name of the command on create. Various values are returned during query depending on the flags specified.

Return to Autodesk Index


Your Ad Here