1 Reply Latest reply on Sep 20, 2015 8:51 AM by c.pfaffenbichler

    How to Get correct LayerSet width from AM?

    nvkzNemo Level 2

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




      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?