Copy link to clipboard
Copied
In extend script, is the active layer the selected layer in the layers palette or not necessarily?
In the document there was an active layer on the reference newLayer (with name Layer 1 copy).
Then a temp layer was created on top. After working with the temp layer, it is shown in the layers palette as highlighted in blue - it is the active layer.
Now we need to activate the previous layer newLayer again. To do this, I lock and hide the temp layer, and do: doc.activeLayer = newLayer;
But even with the subsequent app.redraw();, the layer palette looks like newLayer is an inactive layer.
Copy link to clipboard
Copied
I have no problem in the panel with highlighting returning to layer doc.activeLayer = newLayer. What is your operating system and version of Illustrator? Or maybe show more of a piece of script code.
Copy link to clipboard
Copied
This is likely another of countless other bugs. Instead of activating the newLayer ref I've done newLayer.pageItems.length; and it gave me a correct value.