SICreateLayer

Description

Creates an empty Layer.

Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference so you need to use the best workaround for your situation:

For scripting languages this command returns an ISIVTCollection which you can use to get the output arguments.

For C# you can use the XSIApplication.ExecuteCommand method to call this command. ExecuteCommand packs the output arguments into a C# System.Object containing an Array of the output arguments (see Calling Commands from C#).

Scripting Syntax

SICreateLayer( [PresetObj], [Name], [Value] );

Parameters

Parameter Type Description
PresetObj String or a preset object (see SIGetPreset) Layer preset to use

Default Value: "Default_New_Layer"

Possible Values:

Description:

Default_New_Layer Default new layer
Name String Name of the new layer
Value Layer Returns the new layer

Examples

VBScript Example

' Get initial settings

checkCurrLayer

' Make a new layer (it is *not* automatically set as current)

SICreateLayer , "LayerA",oLayer

checkCurrLayer

' Now explicitly set the new layer as current and check again

SetCurrentLayer oLayer

checkCurrLayer

' Make another new layer (it *is* automatically set as current)

CreateLayer , "LayerB",,oLayer

SetCurrentLayer oLayer

checkCurrLayer

function checkCurrLayer()

	' What is the current layer?

	GetCurrentLayer oCurrLayer

	LogMessage "Current layer is....." & oCurrLayer

end function

'OUTPUT OF ABOVE SCRIPT IS:

'INFO : "Current layer is.....Layers.Layer_Default"

'INFO : "Current layer is.....Layers.Layer_Default"

'INFO : "Current layer is.....Layers.LayerA"

'INFO : "Current layer is.....Layers.LayerB"

See Also

RenderPasses CreateLayer CreatePartition CreatePass SICreateLayer2 SICreateLayerFromSelection SICreateLayerFromSelection2 SICreatePartition