EditCommand.1.js Example

Applies To

EditCommand command

Description

Look up the command by its scripting name. Tip: it is much faster to look up a command by its name.

Code

var scriptingNameToFind = "RenderPass";
var oCommandCollection = Application.Commands;
var commandName = "";
for ( i = 0; i < oCommandCollection.Count ; i++ )
{
	var oCurrentCommand = oCommandCollection(i);
	if (scriptingNameToFind == oCurrentCommand.ScriptingName)
	{
		commandName = oCurrentCommand.Name;
	}
}
// if the command was found, open it in the command editor
if ("" != commandName)
{
	// This displays a dialog box with information
	// about the command
	EditCommand( commandName );
}

Keywords

EditCommand


Autodesk Softimage 2011