ExecuteScriptCommand (XSIApplication)

Description

Executes a Softimage Command. This method can be used to execute any built-in or custom command. The name of the method is misleading, because compiled custom commands can also be executed via this method. For this reason the equivalent method in the C++ API has been renamed to Application::ExecuteCommand.

Typically this method is not necessary from scripting because Softimage commands can be invoked directly. So the main purpose of this method is to enable C++ applications written with COM to be able to call Softimage commands. With the advent of the C++ API it is rarely necessary to use this method.

This method, in scripting, can only return arguments via the return value. In C++ the arguments are supplied to the command via a variant containing a SafeArray. Output arguments must be passed by reference; this is done by setting the variant's argument type to VT_VARIANT | VT_BYREF.

Scripting Syntax

XSIApplication.ExecuteScriptCommand( Name, [Arguments] )

C# Syntax

Object XSIApplication.ExecuteScriptCommand( String in_bzScriptName, Object in_vsa );

Parameters

Parameter

Type

Description

Name

String

Command's script name

Arguments

Array of Variants

Array of all required script command arguments, including output arguments passed by reference. In C++ the argument is implemented as a variant containing a SafeArray of variants.

Return Value

Variant (return value from script command)

See Also

Application.ExecuteScript

Command

Examples

• See XSIApplication.ExecuteScriptCommand.1.vbs

• See XSIApplication.ExecuteScriptCommand.2.vbs

• See XSIApplication.ExecuteScriptCommand.3.pys

• See XSIApplication.ExecuteScriptCommand.4.js



Autodesk Softimage 2011