Adobe 23101335 Scripting Guide - Page 60
Set newLayerSetRef = appRef.ActiveDocument.LayerSets.Add
UPC - 718659152833
View all Adobe 23101335 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 60 highlights
Scripting Photoshop 3 Layer objects The following examples show how to create a layer set after the first layer in the current document: AS: tell application "Adobe Photoshop 7.0" make new layer set after layer 1 of current document end tell VB: Dim appRef As Photoshop.Application Set appRef = CreateObject("Photoshop.Application") ' Get a reference to the first layer in the document Dim layerRef As Photoshop.Layer Set layerRef = appRef.ActiveDocument.Layers(1) ' Create a new LayerSet (it will be created at the beginning of the ' document) Dim newLayerSetRef As Photoshop.LayerSet Set newLayerSetRef = appRef.ActiveDocument.LayerSets.Add ' Move the new layer to after the first layer newLayerSetRef.MoveAfter layerRef JS: // Get a reference to the first layer in the document var layerRef = activeDocument.layers[0]; // Create a new LayerSet (it will be created at the beginning of the // document) var newLayerSetRef = activeDocument.layerSets.add(); // Move the new layer to after the first layer newLayerSetRef.moveAfter( layerRef ); An existing art layer can also be changed to a text layer if the existing layer is empty. Conversely you can change a text layer to a normal layer. When you do this the text in the layer is rasterized. Photoshop 7.0 Scripting Guide 60