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

How to Get correct LayerSet width from AM?

Participant ,
Sep 18, 2015 Sep 18, 2015

Copy link to clipboard

Copied

I tried to get width of LayerSet (folder)...

amwidth.png

ExtendScript return correct width

// return correct width (200px)

var width1 = app.activeDocument.activeLayer.boundsNoEffects[2].value - app.activeDocument.activeLayer.boundsNoEffects[0].value;

but with ActionManager i have a trouble

// return incorrect width (1000px = document width)

var ref = new ActionReference();

ref.putEnumerated(charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));

var width2 = executeActionGet(ref).getObjectValue(stringIDToTypeID("boundsNoEffects")).getDouble(stringIDToTypeID("width"));

How to Get correct LayerSet width from AM? Any ideas?

TOPICS
Actions and scripting

Views

301

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
Community Expert ,
Sep 20, 2015 Sep 20, 2015

Copy link to clipboard

Copied

LATEST

Seems it’s one of those things … I think there are a few things that are more difficult or even impossible to get with AM code.

You could file a bug report, but I am afraid Scripting issues are often considered low priority at Adobe because most Photoshop users do not concern themselves with the subject matter anyway.

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