Copy link to clipboard
Copied
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();
}
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;
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
Thank you very much.
Just as you said, I found this method.
Copy link to clipboard
Copied
Yes, because we showed this method in the other thread on this topic...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now