Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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,
}
Copy link to clipboard
Copied
Hi mark Thank you for the quick response.i could try
Copy link to clipboard
Copied
Hi mark this is not work for me
Copy link to clipboard
Copied
Hi
app.selection[0].splineItems[0].anchoredObjectSettings.pinPosition=false
This syntax worked for me
Thank you Mark
Copy link to clipboard
Copied
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