Some params functions return a ParamScriptable object named this, which contains several methods that enable you to manipulate parameters.
In ogScript, use methods of the this object to manipulate parameters. To call a general-purpose function, use:
this.methodname(parameters);
For example:
this.replaceConstraint ("0.0;100.0;0.0;100.0;1");
The following table lists the methods of the ParamScriptable object.
Method |
Parameters |
Returns |
Description |
deleteParam |
N/A |
N/A |
Deletes the parameter |
getConstraint |
N/A |
Returns the parameter constraint |
Gets the parameter constraint |
getAllValues |
N/A |
The entire array of values within the parameter. |
Retrieves the entire array of values within the parameter. |
getElementCount |
N/A |
The number of elements in the parameter array, as an Integer. |
Gets the number of elements in the parameter array. |
getIndex |
N/A |
Returns the index of the changed element |
Get the index of the changed element |
getOid |
N/A |
Returns the OID of the changed parameter |
Gets the OID of the changed parameter |
getValue |
N/A |
Returns the value of the changed element |
Gets the value of the changed element |
getValueAsString |
N/A |
Returns a string representation of the changed value |
Gets a string representation of the changed value |
getValueAt |
Integer [index] |
Returns a string representation of the value at the provided index |
Gets a string representation of the value at the provided index |
getValueAtAsString |
Integer [index] |
Returns a string representation of the value at the provided index |
Gets a string representation of the value at the provided index |
setValue |
String [value] |
N/A |
Sets the value of the changed element to the provided value. |
getName |
N/A |
Returns the parameter name |
Gets the parameter name |
replaceConstraint |
String [onstraint] |
N/A |
Replaces the parameter's constraint to the provided value |
getIndex |
N/A |
Returns the array index of the current element |
Gets the array index of the current element |
remove |
N/A |
N/A |
Removes the current array element |
isArrayParameter |
N/A |
Returns true if the parameter is an array element |
Checks whether the parameter is an array element |
resetAllValues |
N/A |
N/A |
If the parameter is a copy of a base parameter, this function resets the parameter’s values to those of the base parameter. |
setValueAt |
Integer [index] String [value] |
N/A |
Sets the value of element at the provided index to the provided value. |
getElementCount |
N/A |
Returns the number of elements in the array |
Gets the number of elements in the array |