Skip to main content
greless
Inspiring
May 30, 2019
Answered

How to get more than 2 layer properties

  • May 30, 2019
  • 2 replies
  • 1298 views

hello,

     for example,i wanted to get layer's name and visible,but don't get all layer property because of watse times.when the getting one's feasible use "putProperty" but more than two is fail.How to get more than 2 layer properties please?

    

This topic has been closed for replies.
Correct answer Tom Ruark

There is no way to get two using one call to Photoshop. Just call Photoshop twice, once for each property you want. The time hit on calling for all properties is what you want to avoid!

2 replies

greless
grelessAuthor
Inspiring
May 31, 2019

@r-bin

Is there a way please?such as " ActionList"

Legend
June 1, 2019

It does not work two either. More than two does not work, but does not cause errors. What is your error?

You can use it. But there will be access not to all properties.

var r = new ActionReference();

r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));

d = executeActionGet(r);

Slowly working for "application" and "document";

Tom Ruark
Tom RuarkCorrect answer
Inspiring
June 3, 2019

There is no way to get two using one call to Photoshop. Just call Photoshop twice, once for each property you want. The time hit on calling for all properties is what you want to avoid!

JJMack
Community Expert
Community Expert
May 30, 2019

I do not know how to use action manager executeActionGet, But I would thing you woyl need to target some layer  like the activelayer to get layer information.   I do not see any layertarget pramenter for yoy GetIbfo function.   if yoy are goinf after the active layer wiul the not be:

alert(app.activeDocument.activeLayer.name  + " Visible= " +  app.activeDocument.activeLayer.visible);

Some Object needs  to be addressed

JJMack
greless
grelessAuthor
Inspiring
May 31, 2019

thanks,That's not what I wanted,