Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is the active layer the selected layer in the layers palette or not necessarily?

Engaged ,
Nov 16, 2024 Nov 16, 2024

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.

Screenshot_3.png

 

TOPICS
Bug , Scripting
181
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Enthusiast ,
Nov 16, 2024 Nov 16, 2024

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 16, 2024 Nov 16, 2024
LATEST

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines