This content has been marked as final.
Show 2 replies
-
1. Re: transform center point
Michael L Hale Nov 12, 2013 4:23 PM (in response to saigon80)If you don't want to use one of the preset anchor positions you need to use Action Manager.
function transform( x, y) {// anchor position as pixels var desc = new ActionDescriptor(); var ref = new ActionReference(); ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') ); desc.putReference( charIDToTypeID('null'), ref ); desc.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsi') ); var desc7 = new ActionDescriptor(); desc7.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Rlt'), x ); desc7.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Rlt'), y ); desc.putObject( charIDToTypeID('Pstn'), charIDToTypeID('Pnt '), desc7 ); desc.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Prc'), 100 ); desc.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Prc'), 100 ); desc.putBoolean( charIDToTypeID('Lnkd'), true ); desc.putEnumerated( charIDToTypeID('Intr'), charIDToTypeID('Intp'), charIDToTypeID('Bcbc') ); executeAction( charIDToTypeID('Trnf'), desc, DialogModes.ALL ); }; transform( 584, 330) -
2. Re: transform center point
saigon80 Nov 12, 2013 9:42 PM (in response to Michael L Hale)you really helped me !

