Skip to main content
Dhandapani_be
Known Participant
April 20, 2022
Answered

Anchorposition

  • April 20, 2022
  • 1 reply
  • 466 views

Hi

      If any one face this issue how to enable or disable in Anchor (Keep within Top/Bottom Column Boundries).in scripting

pls suggest.find screen shot below.Correct answer much appreciated.

This topic has been closed for replies.
Correct answer m1b

Great, well done! Yes you can set the anchoredObjectSettings.pinPosition of any object that has anchoredObjectSettings (there are a lot). My script was just an example.

- Mark

1 reply

m1b
Community Expert
Community Expert
April 20, 2022

It is the "pinPosition" property of AnchoredObjectsettings.

- Mark

 

// example usage
var item = app.activeDocument.selection[0];
item.anchoredObjectSettings.properties = {
    anchoredPosition: AnchorPosition.ANCHORED,
    anchorPoint: AnchorPoint.TOP_RIGHT_ANCHOR,
    horizontalAlignment: HorizontalAlignment.RIGHT_ALIGN,
    horizontalReferencePoint: AnchoredRelativeTo.COLUMN_EDGE,
    pinPosition: true,
    verticalReferencePoint: VerticallyRelativeTo.CAPHEIGHT,
}
Dhandapani_be
Known Participant
April 20, 2022

Hi mark Thank you for the quick response.i could try