Skip to main content
vinoth_mannu
Inspiring
June 11, 2013
Question

Transform selection increase problem

  • June 11, 2013
  • 1 reply
  • 877 views

Hi ALL,

I am trying to apply transform on some selected objects 10 % increase, i could see the part are moved from the orginal place.

If we try to do select the individual object this works fine.

Any idea

var idTrnf = charIDToTypeID( "Trnf" );

    var desc6 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref3 = new ActionReference();

        var idLyr = charIDToTypeID( "Lyr " );

        var idOrdn = charIDToTypeID( "Ordn" );

        var idTrgt = charIDToTypeID( "Trgt" );

        ref3.putEnumerated( idLyr, idOrdn, idTrgt );

    desc6.putReference( idnull, ref3 );

    var idFTcs = charIDToTypeID( "FTcs" );

    var idQCSt = charIDToTypeID( "QCSt" );

    var idQcsa = charIDToTypeID( "Qcsa" );

    desc6.putEnumerated( idFTcs, idQCSt, idQcsa );

    var idOfst = charIDToTypeID( "Ofst" );

        var desc7 = new ActionDescriptor();

        var idHrzn = charIDToTypeID( "Hrzn" );

        var idRlt = charIDToTypeID( "#Rlt" );

        desc7.putUnitDouble( idHrzn, idRlt, 0.000000 );

        var idVrtc = charIDToTypeID( "Vrtc" );

        var idRlt = charIDToTypeID( "#Rlt" );

        desc7.putUnitDouble( idVrtc, idRlt, 0.000000 );

    var idOfst = charIDToTypeID( "Ofst" );

    desc6.putObject( idOfst, idOfst, desc7 );

    var idWdth = charIDToTypeID( "Wdth" );

    var idPrc = charIDToTypeID( "#Prc" );

    desc6.putUnitDouble( idWdth, idPrc, 110.000000 );

    var idHght = charIDToTypeID( "Hght" );

    var idPrc = charIDToTypeID( "#Prc" );

    desc6.putUnitDouble( idHght, idPrc, 110.000000 );

    var idLnkd = charIDToTypeID( "Lnkd" );

    desc6.putBoolean( idLnkd, true );

executeAction( idTrnf, desc6, DialogModes.NO );

Regards,

Vinoth

This topic has been closed for replies.

1 reply

pixxxelschubser
Community Expert
Community Expert
June 12, 2013

Does this works for you? (I hope, I understand you right)

// CopyPasteResize.jsx

// http://forums.adobe.com/thread/1230010?tstart=0

// copy, paste and resize to 110%

// a selection is necessary and the layer can not be blank

var aDoc = app.activeDocument;

var Sel = aDoc.selection;

Sel.copy ();

aDoc.paste();

aDoc.activeLayer.resize(110,110, AnchorPosition.MIDDLECENTER)

Have fun.

vinoth_mannu
Inspiring
June 13, 2013

Awesome!!!

It works well and excellent thinking,

When i run through ESTK it works fine. but when i created Panels through adobe configurator i could see error

Regards,

Vinoth

pixxxelschubser
Community Expert
Community Expert
June 13, 2013

Hmmh?

You have not spoken of use in a panel previously.

Some conjectures:

Is "Transform" the correct adobe configurator syntax for "resize"? (I only have CS3 and that's why no configurator)

And have you implemented a selection? Copy and paste are working in your panel (standalone)?