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

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

Contributor ,
Nov 16, 2024 Nov 16, 2024

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.

Screenshot_3.png

 

TOPICS
Bug , Scripting

Views

98

Translate

Translate

Report

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

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.

Votes

Translate

Translate

Report

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
Contributor ,
Nov 16, 2024 Nov 16, 2024

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

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