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

I only know the object style name. How can I get and modify the size options?

Guide ,
Aug 17, 2025 Aug 17, 2025

I only know the object style name. How can I get and modify the size options?
Something simpler.
My image object style name is mypic, and I want to modify its width.
mypic.transformAttributeOptions.transformAttrWidth = 60;
I want to reassign it to 80,

Something like this:

if(transformAttributeOptions.transformAttrWidth !=80){  
transformAttributeOptions.transformAttrWidth =80;  
abc();  
}  
else{  
aaa();  
}

 

TOPICS
How to , Scripting
174
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 , Aug 18, 2025 Aug 18, 2025

I only know the object style name.

 

Use itemByName

 

var os = app.activeDocument.objectStyles.itemByName("AA");
os.transformAttributeOptions.transformAttrWidth = 80;

or

app.activeDocument.objectStyles.itemByName("AA").transformAttributeOptions.transformAttrWidth = 80;
Translate
Community Expert ,
Aug 18, 2025 Aug 18, 2025

I only know the object style name.

 

Use itemByName

 

var os = app.activeDocument.objectStyles.itemByName("AA");
os.transformAttributeOptions.transformAttrWidth = 80;

or

app.activeDocument.objectStyles.itemByName("AA").transformAttributeOptions.transformAttrWidth = 80;
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 ,
Aug 18, 2025 Aug 18, 2025

Thank you very much.
Just as you said, I found this method.

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 ,
Aug 18, 2025 Aug 18, 2025
LATEST

Yes, because we showed this method in the other thread on this topic...

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