CreateLayerGroup

Categories

layer

Description

Creates a Layer Group.

This command will create a Layer Group and if a layer is passed as an argument, will move the layer as child of the newly created Layer Group therefore creating a valid Layer Group structure.

Scripting Syntax

CreateLayerGroup( [PresetObj], [InputObj], [Name] );

Parameters

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

Default Value: "Default_New_Layer"

InputObj String The list of layers to move into the newly created Layer Group. Can be empty.
Name String Name of Layer Group

Examples

VBScript Example

'Create a new layer called MyLayerExample
'The current layer is now MyLayerExample
CreateLayer , "MyLayerExample"
'The command creates a Layer Group
CreateLayerGroup , "Layers.MyLayerExample", "MonLayer"
SelectObj "Layers.MonLayer"
Logmessage selection(0).Layers.Count
For each oLayer in selection(0).Layers
        Logmessage oLayer.fullname
Next
'OUTPUT OF ABOVE SCRIPT IS:
' INFO : 1
' INFO : Layers.MonLayer.MyLayerExample