Notifications
Clear all

[Closed] set current layer by name

how do i set one of my layers as current ???

3 Replies
1 Reply
(@handiklap)
Joined: 10 months ago

Posts: 0

a quick search through the mxs help yielded this:

myLayer = layermanager.getlayerfromname <string>
 myLayer.current = true

You have to first get the Layer by Name and then set it to current by its Layer Properties.

layer = LayerManager.getLayerFromName "0" -- get the 0(default) layer by name
layer.current = true -- set it as current

-Eric

thanks a lot guys…