What You Should Know about Return Values

Autodesk Softimage provides a very diverse set of native scripting commands and object model methods. This means that what gets returned completely depends on which command or method you are calling and how you capture that value.

The C# and Scripting Reference provides documentation for each native command and object model method in Softimage. Part of this documentation includes the kind of value it returns. For VBScript, when you are getting return values from commands or methods, you need to decide whether to use a data value variable or an object variable:

    ' The Set keyword declares your variable to be a
    ' pointer to an object, not a data value variable

    ' Setting a data value variable in VBScript
    myVar = CommandOrMethodName()

    ' Setting an object variable in VBScript
    Set myVar = CommandOrMethodName()

For example, if you use a method that is supposed to return an object, you must use an object variable; alternatively, if you use a method that is supposed to return a numerical value (like double), you must use a data value variable.

| For more specifics about the differences between these types of return values, see Returning Data Values and Returning Objects.

Autodesk Softimage v7.5