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

How do I apply properties to the style of the a1 object under the AA group?

Guide ,
Sep 30, 2025 Sep 30, 2025

I'm lost again, or perhaps I've forgotten.

Like this:

var enObjWidth = app.documents[0].objectStyleGroups.itemByName(AA).itemByName(a1).transformAttributeOptions.transformAttrWidth;

dublove_0-1759229269552.jpeg

 

TOPICS
How to , Scripting
66
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
Guide ,
Sep 30, 2025 Sep 30, 2025

I've found the answer to this.
Thanks.

var reObjWidth = app.documents[0].objectStyleGroups.itemByName(AA).
    objectStyles.itemByName(a1).transformAttributeOptions.transformAttrWidth;

 

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
Community Expert ,
Sep 30, 2025 Sep 30, 2025

You should quote "AA" and "a1". Otherwise you must have those variables existing, eg. var AA = "AA", a1 = "a1";

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
Guide ,
Oct 02, 2025 Oct 02, 2025
LATEST

@m1b 

I just feel that the execution efficiency below is a bit low:

app.documents[0].objectStyleGroups.itemByName(“AA”).objectStyles.itemByName(“a1”)

No other issues were found.

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