• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Having Trouble getting this box to Rotate.

Advocate ,
Feb 22, 2017 Feb 22, 2017

Copy link to clipboard

Copied

I have having trouble getting this text box to rotate.

     function addTextF(doc, layer, name){ 

app.generalPreferences.preventSelectingLockedItems= false;

        var myBlendingSettings = { blendMode : BlendMode.NORMAL };       

        var myTransparencySettings = { blendingSettings : myBlendingSettings };    

         

        var tF = doc.textFrames.itemByName(name); 

        if(tF && tF.isValid) {       

tF.remove(); 

        } 

        var origUnit = app.scriptPreferences.measurementUnit; 

       

app.scriptPreferences.measurementUnit = MeasurementUnits.INCHES;

    tF = doc.textFrames.add(layer, LocationOptions.UNKNOWN, {name: name, fillColor :"Paper", fillTint: 100, transparencySettings : myTransparencySettings, geometricBounds: ['.504in','.21in','.376in','-.21in'] });

tF.flipItem(Flip.HORIZONTAL,AnchorPoint.CENTER_ANCHOR);           

tF.locked=true;

app.scriptPreferences.measurementUnit = origUnit;     

              return tF; 

    }

FROM THIS

Screen Shot 2017-02-22 at 9.53.37 AM.png

TO THIS

Screen Shot 2017-02-22 at 9.53.35 AM.png

TOPICS
Scripting

Views

263

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Feb 22, 2017 Feb 22, 2017

Depending on whether tF.flipItem(…) is applied, or not, before the rotation, try either

  • tF.rotationAngle += 90;

or

  • tF.rotationAngle -= 90;

@+

Marc

Votes

Translate

Translate
Guide ,
Feb 22, 2017 Feb 22, 2017

Copy link to clipboard

Copied

Depending on whether tF.flipItem(…) is applied, or not, before the rotation, try either

  • tF.rotationAngle += 90;

or

  • tF.rotationAngle -= 90;

@+

Marc

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 23, 2017 Feb 23, 2017

Copy link to clipboard

Copied

LATEST

thank you thank you thank you.  i was trying that flip.VERTICAL and all other variants of that.  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines