Inserting a Parameter as a Variable Object

A parameter can be put into the script as a Variable object.

See Also
Representing a Parameter as Its Primitive Type
Inserting a Parameter as a Value Object

Inserting a parameter as a Variable object allows access to additional information beyond just the value. You can get the parameter name, mode, data type, unit, and limits.

You must never assign a value or another parameter with a script type of Variable. Instead, you should change the value as follows:

outParam.getValueObj().setValue(42);   // Correct
outParam = 42;                         // *** WRONG ***