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

How to assign the same properties to several text frames

Explorer ,
Jun 20, 2017 Jun 20, 2017

Copy link to clipboard

Copied

I generated several text frames (gave them variables and labels), now I would like to give all of the at once paragraph properties (font, size, ...):

I did it like this (now the labels are in the array) and also with the variables of the text frames in the array, but it doesn't work. If I write something in my generated text frames it is standard font of InDesign?! (I'm using CS6):

for (var a = 0; a < 19; a++) {

          myGB_TF_Chef[0] += myTF_gapChef;

          myGB_TF_Chef[2] += myTF_gapChef;

          var myNextChefTF = myMasterSpread.textFrames.add({

                        geometricBounds: myGB_TF_Chef,

                        label: "NextChef"});

       }

// define the format of the text frame, regular, nothing special

var myNextTF_array = [NextFoFe, NextKuerzel, NextSAP, NextTitle, NextChef];

      var myPara7 = myNextTF_array.paragraphs[0];

                                    myPara7.properties = {

                                        appliedFont: app.fonts.item("InfoOTText"), // which font is used

                                       fontStyle: "Regular", // bold or regular or italic

                                       pointSize: 12, // which font size is used

                                        justification: Justification.leftAlign // should the text be left, center or right aligned

                                    }; // end of description of first TextBox

Any idea what I did wrong? Can't I put variables or labels in an array?

Best

Cleo

TOPICS
Scripting

Views

199

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
no replies

Have something to add?

Join the conversation