Release Anchor objects with JavaScript
- This topic has 3 replies, 4 voices, and was last updated 2 years, 6 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / Release Anchor objects with JavaScript
Learn / Forums / General InDesign Topics / Release Anchor objects with JavaScript
Hello Everyone,
Since the “InDesign Add-ons (Scripts, Scripting, and Plug-ins)” is closed, I’m posting a script related question here.
I was looking for a JavaScript to Un-Anchor all the Anchored objects in a document.
I tried the “ReleaseAnyAnchor.jsx”, but that requires me to select an Inline Anchor object first. So selecting each and every anchor item and running the script is a tedious task.
I checked this as well, but it doesn’t action anything:
https://community.adobe.com/t5/indesign/release-all-anchored-objects-at-once/td-p/3807944?page=1
var a = app.activeDocument.allPageItems, t;
while( t = a.pop() )
{
t.isValid &&
t.hasOwnProperty('anchoredObjectSettings') &&
(t.parent instanceof Character) &&
(t=t.anchoredObjectSettings).isValid &&
t.releaseAnchoredObject();
}
I also took a dive in to this, but it is not at all what is expected.
https://gist.github.com/mhjb/5f78dee507754f0871891efe2c70d5ba
I also tried “UnAnchor_TextFramesOnly_V3.jsx” but it only Un-Anchors the text frames.
Since I’m on CC 2019, I think there might be an updated version of “ReleaseAnyAnchor.jsx”. Can anyone help me on this, a simple script to Release all the anchored objects within a document.
Thanks,
Masood
Hi MAsood,
Did you find a solution for this? I am facing the same issue.
Thanks!
Pat
Hi Masood,
Not sure if this is what you are looking for, but the script created by M.Hasanain in the link below, works.
All the best
Atul
Nice
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!