Check the width of the active layer
How to check if the width of the active layer is less than 15cm? If this is true to do something, if it is false to do something else. Thank you!
![]()
How to check if the width of the active layer is less than 15cm? If this is true to do something, if it is false to do something else. Thank you!
![]()
function sTT(v) {return stringIDToTypeID(v)}
function wdh() {
(ref = new ActionReference()).putEnumerated(sTT('layer'), sTT('ordinal'), sTT('targetEnum'))
return executeActionGet(ref).getObjectValue(sTT('bounds')).getInteger(sTT('width')) / 118.11 < 15
}
alert((res = wdh()) ? res : res)
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.