AddScriptedOpFromFile (ProjectItem)

Introduced

4.0

Description

Creates a new scripted operator and connects its output to this object. If the scripting file is not specified then a default implementation is used. The scripting language is optional, if not specified then the language associated with the file extension will be used. If this cannot be determined then the current scripting language user preference will used.

Scripting Syntax

ProjectItem.AddScriptedOpFromFile( [FileName], Inputs, [Name], [Language], [ConstructionMode] )

C# Syntax

CustomOperator ProjectItem.AddScriptedOpFromFile( String bszFileName, Object vInputs, String bszName, String bszLanguage, siConstructionMode in_constructionmode );

Parameters

Parameter

Type

Description

FileName

String

The script filename 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

ConstructionMode

siConstructionMode

The location in the construction stack where the operator should be created. This only applies to output connections made to Geometry objects; this mode will be ignored for all other types of connections.

Default Value: siConstructionModeDefault

Return Value

CustomOperator

See Also

AddScriptedOpFromFile

ConvertScriptedOp

CustomOperator

Parameter.Source

ProjectItem.AddScriptedOp

Parameter.AddScriptedOpFromFile

Parameter.AddScriptedOp

 

Examples

• See ProjectItem.AddScriptedOpFromFile.1.js



Autodesk Softimage 2011