' 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" |