Skip to main content
revathiv80720177
Known Participant
September 4, 2018
Question

Creating Object Styles using Script

  • September 4, 2018
  • 1 reply
  • 1179 views

Hi,

I tried to create Object Styles with Size and position properties in InDesign CC 2018.But I couldn't find references for Size and Position properties(Object Style propeties) in  InDesign ExtendScript API(13.0).Is it possible to create Object Styles with Size and position properties using Script ?Please do guide me on this..

Thanks and Regards,

Revathi V

This topic has been closed for replies.

1 reply

Colin Flashman
Community Expert
Community Expert
September 9, 2018

That's bizarre, I can't find them either. I can find the following properties from here: https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ObjectStyle.html

enableTransformAttributes (will activate/deactivate this portion of the object style)

setDimensionAttributeState (activates the width, height or both)

setPositionAttributeState (activates the X, Y or both coordinates)

but I can't find where you would get the width, height, x or y offsets or their distance from page edge/margin. I suspect the documentation is simply missing.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Peter Kahrel
Community Expert
Community Expert
September 9, 2018

Size and position are set using the transformAttributeOptions property:

myObjectStyle.transformAttributeOptions.transformAttrHeight = 24

etc.

Peter