[Closed] Set Active Layer via Maxscript
This seems so simple to be able to do. Yet it is not.
with maxscript I want to be able to set the active layer to a called “duplicatesGarbage”.
I have tried all kinds of syntax options and nothing works. Anyone care to be generous and help? It has to be a simple one liner, but I get nothing but script execution error for everything I’ve tried.
EDIT: I misunderstood the question.
Try this:
(LayerManager.getLayerFromName "duplicatesGarbage").current = true
I was so close, I assumed
(LayerManager.getLayerFromName “duplicatesGarbage”).current = 1
was the same as
(LayerManager.getLayerFromName “duplicatesGarbage”).current = true
but apparently 0 and 1 aren’t boolean values in Maxscript world.
Thanks for your time and a working answer… cheers!
Unfortunately yes, 0 and 1 are not Boolean values in MXS.
You can use true/on and false/off instead.