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

Applying object styles to multiple graphic cells frames

Participant ,
Sep 27, 2018 Sep 27, 2018

Hi!

I have a table that I'm changing the first row cells to graphic cells with this script:

app.selection[0].properties = {

    leftEdgeStrokeWeight:0,

    rightEdgeStrokeWeight:0,

    topEdgeStrokeWeight:0,

    topEdgeStrokeWeight:0,

    innerColumnStrokeWeight:0,

    graphicRightInset:2,

    graphicLeftInset:1,

    graphicBottomInset:2

    };

app.selection[0].convertCellType(CellTypeEnum.GRAPHIC_TYPE_CELL, false);

First row selected after run the script:

tabela1.jpg

Before run the script:

tabela2.jpg

My question is: With the row selected like in the image, how can I reach (with a loop?) each frame inside each graphic cells to apply a object style? Without need to select one by one to apply?

My final goal is something like that:

tabela3.jpg

Hope that I explained in the right way.

Thanks in advance!

TOPICS
Scripting
755
Translate
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

Community Expert , Sep 27, 2018 Sep 27, 2018

app.selection[0].allPageItems should give you all the rectangles

-Manan

Translate
Community Expert ,
Sep 27, 2018 Sep 27, 2018

app.selection[0].allPageItems should give you all the rectangles

-Manan

Translate
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
Participant ,
Sep 28, 2018 Sep 28, 2018
LATEST

I used your answer with a loop and works!

var myDoc = app.activeDocument;

var mySel = app.selection[0].allPageItems;

for (i = 0; i < mySel.length; i++) {

    mySel.appliedObjectStyle = myDoc.objectStyles.itemByName("cell");

}

Thank you so much!

Translate
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