AddScriptedOp (Parameter)

Introduced

4.0

Description

Creates a new runtime scripted operator and connects its output to this object. If the scripting code is not specified then a default implementation will be used. For parameter connections a simple assignment of the current value will be created; for example, 'out.Value = 0.00'.

Specifying the scripting language is optional. If not specified then the current scripting language user preference will be used.

Tip: This is the Object Model version of the AddScriptedOp command, which also creates a runtime scripted operator. To create a Self-Installed Custom Operator, use the AddCustomOp command or Parameter.AddCustomOp method.

Scripting Syntax

Parameter.AddScriptedOp( [Code], Inputs, [Name], [Language] )

C# Syntax

CustomOperator Parameter.AddScriptedOp( String bszCode, Object vInputs, String bszName, String bszLanguage );

Parameters

Parameter

Type

Description

Code

String

The script code containing the implementation of the scripted operator.

Inputs

List

List of objects or parameters to be connected to input ports.

Name

String

The name of the new operator

Default Value: ScriptedOp

Language

String

The script language of the new scripted operator

Default Value: Preference value from application.preferences.scripting.language

See Also

AddScriptedOp

ConvertScriptedOp

CustomOperator

Parameter.Source

Parameter.AddScriptedOpFromFile

ProjectItem.AddScriptedOp

ProjectItem.AddScriptedOpFromFile

 

Examples

• See Parameter.AddScriptedOp.1.js



Autodesk Softimage 2011