Add Layer
The
ADD LAYER command creates a new layer in the active document. This layer automatically becomes the active layer, i.e. all elements which you now generate will be assigned to this layer. The command will also return a reference on the layer it has just created (see
Layer Object).
ADD LAYER"name"rgb
name
Name of the layer.
r, g, b
Identifying color of the layer as RGB. All three color-numbers have to defined separated by a blank to execute the macro command correctly.
#no color given
DEFINE lyr AS layer
lyr = ADD LAYER "myNewLayer"
#a new layer with an identification color
ADD LAYER "anotherLayer" 188 0 29
#a more complex example
MACRO AddLayers
DEFINE i AS integer
DEFINE k AS integer
FOR i = 1 TO 8
k = 32*(i-1)
ADD LAYER "Layer "+i 255-k k 0
END FOR
END MACRO