Anchorposition

Explorer ,
Apr 19, 2022 Apr 19, 2022

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.AnchorPosition.JPG

TOPICS
Scripting

Views

86

Likes

Translate

Translate

Report

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 3 Correct answers

Adobe Community Professional , Apr 19, 2022 Apr 19, 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, }

Likes

Translate

Translate
Explorer , Apr 19, 2022 Apr 19, 2022
Hi      app.selection[0].splineItems[0].anchoredObjectSettings.pinPosition=false This syntax worked for me Thank you Mark

Likes

Translate

Translate
Adobe Community Professional , Apr 20, 2022 Apr 20, 2022
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

Likes

Translate

Translate
Adobe Community Professional ,
Apr 19, 2022 Apr 19, 2022

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,
}

Likes

Translate

Translate

Report

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
Explorer ,
Apr 19, 2022 Apr 19, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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
Explorer ,
Apr 19, 2022 Apr 19, 2022

Copy link to clipboard

Copied

Hi mark this is not work for me

Likes

Translate

Translate

Report

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
Explorer ,
Apr 19, 2022 Apr 19, 2022

Copy link to clipboard

Copied

Hi 

     app.selection[0].splineItems[0].anchoredObjectSettings.pinPosition=false

 

This syntax worked for me

 

Thank you Mark

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Apr 20, 2022 Apr 20, 2022

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

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