• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

211

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

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

Votes

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

Votes

Translate

Translate
Community Expert , 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

Votes

Translate

Translate
Community Expert ,
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,
}

Votes

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

Votes

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

Votes

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

Votes

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
Community Expert ,
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

Votes

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