Release both anchored objects

Dear all, I want an objects anchored all of my output file. All the anchors are created inside the table. I use InDesign CS4.

I have a file for 4 pages that is containing more than 150 images to be released anchored. That the images should be placed in the same place. Just release. I want to do for more than 100 files (400 pages, it may increase in the future). I tried this find/replace option using object, but I can find using the custom options in the Panel options anchor, not able relase by using find and replace.

Please help me as soon as POSSIBLE.

Thanks in advance, Thiru

Try this:

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();
    }

@+

Marc

Tags: InDesign

Similar Questions

  • Release the anchored objects

    Hello

    Is anyone know about a scrip to clear all objects rooted in a 5.5 InDesign document?

    Thanks in advance

    Maria

    HI Maria,

    Please use the JS code below but the code is your requirement has been resolved, according to me, this way is large round circle. If someone doing short fitness after my script to edit or change.

    var myDoc = app.activeDocument;
    var myPGItem = myDoc.allPageItems;
    for(j=0; j
    

    THX

    csm_phil

  • Release of anchor all the objects/text images

    Dear all,

    It's my 1st question on AC (Adobe Community), so I'll explain what I need here in details and excuse me my little or even none experienced in coding, especially in Javascript.

    I have a book with many INDD files, these files have a lot of images and objects and text blocks are anchored to the main text area.

    I searched on AC for the way to free him from all my anchored object and the main text block text block. so I found the average script.

    I found her name "ReleaseAnyAnchor" created by 'Dave Saunders' to release the anchored object (graphics, text, else) but one by one. and it will take too much time to free myself from all the objects on the book. (the Script code is below)

    //DESCRIPTION: Release Inline & Anchored Items
    //Written by Dave Saunders, released on indesignsecrets.com
    
    
    (function() {
      if (app.documents.length > 0 && // must be a document open
      app.selection.length == 1 && // selection must be of single item
      app.selection[0].parent instanceof Character) { // selection must be anchored
      if (parseFloat(app.version) < 6) {
      releaseMe(app.selection[0]);
      } else {
      app.doScript(releaseMe, undefined, app.selection[0], UndoModes.entireScript, "Release Any Anchor");
      }
      } else {
      alert("Please select an inline item.");
      }
    
    
      function releaseMe(myPI) {
      var yePage = findPage(myPI);
      var startBounds = myPI.geometricBounds;
      myPI.anchoredObjectSettings.anchoredPosition = AnchorPosition.anchored;
      myPI.anchoredObjectSettings.releaseAnchoredObject();
      if (yePage != null) {
      myPI.move(yePage);
      }
      myPI.move([startBounds[1], startBounds[0]]);
      }
    
    
      function findPage(theObj) {
      if (theObj.hasOwnProperty("baseline")) {
      theObj = theObj.parentTextFrames[0];
      }
      while (theObj != null) {
      if (theObj.hasOwnProperty("parentPage")) return theObj.parentPage;
      var whatIsIt = theObj.constructor;
      switch (whatIsIt) {
      case Page : return theObj;
      case Character : theObj = theObj.parentTextFrames[0]; break;
      case Cell : theObj = theObj.insertionPoints[0].parentTextFrames[0]; break;
      case Note : ; case Footnote : theObj = theObj.storyOffset; break;
      case Application : return null;
      }
      if (theObj == null) return null;
      theObj = theObj.parent;
      }
      return theObj
      } // end findPage
    
    
    }());
    


    also, I found another script which release all of the graphic objects, but not objects of text frame. (I get it from AC, but I remember exactly the place where.)


    if(app.documents.length!=0) {
        var ad = app.activeDocument;
        var pgit = ad.pageItems;
        var pgitlg = pgit.length;
        var objprocessed = 0;
        if(pgitlg !=0)
        {
            for(i=0; i<pgitlg; i++)
            {
                if(pgit[i].getElements()[0].constructor.name == "TextFrame")
                {
                    var tfg = pgit[i].allGraphics;
                    var tfglg = tfg.length;
                    for(j=0; j<tfglg; j++)
                    {
                        var rec = tfg[j].parent;
                        rec.anchoredObjectSettings.releaseAnchoredObject();
                    }
                }
            }
        }
    }
    


    all codes work well for me, but I need to try to merge or make a new code [as I mentioned that I don't have experiences in JS, so I do not know how to compile a new code that do the 2 steps of the 2 codes.]


    my request is, could you please help me to do this new code, or merge to compile a new code in the new file.


    I saw this topic releasing objects anchored and want to make a new script.


    Please try to help me as soon as POSSIBLE because I need this script to all my object anchored to begin working on the output file.


    I need the code works on any version of INDESIGN.


    Thanks guys, waiting for you.


    AMR

    AHA. If you need test whether a line is an anchor. If this is the case, use. releaseAnchoredObject(), if it is not, the simplest is to make an anchor, then release it:

    if (pageItems[i].parent instanceof Character) {
        if (pageItems[i].anchoredObjectSettings.anchoredPosition !== AnchorPosition.ANCHORED) {
            pageItems[i].anchoredObjectSettings.anchoredPosition = AnchorPosition.ANCHORED;
        }
        pageItems[i].anchoredObjectSettings.releaseAnchoredObject();
    }
    

    It works, but I don't know if the results are what you're after.

    Peter

  • Anchored objects are transparent

    Thanks in advance for the help. I'm using CS5.

    I have a document have been multiple anchored objects, ended by overlap. My problem is that the anchored objects have transparency them I can't delete the value. Things to note:

    • Transparency goes away if I release the anchored object.
    • I have an object assigned to the anchored frames style, but there are style overrides that I can't erase the anchored objects.
    • I do the object style assigned to anchored objects changes have no effect. Only the box 'options of anchored objects' attributes change anchored objects.

    Any contributions to this issue would be great. Thank you!

    Looks like maybe that transparency is applied to the text in which you anchor.

  • Make custom arrowhead. Cannot use spacing customized to an anchored object that is "path"?

    Hello world

    I build a model to use for the preparation of the documents for the brand of the company. I'm trying to find an easy way to make custom arrows that we will use for the legends (see below).

    Screen Shot 2015-05-26 at 10.09.54 AM.png

    What I want to do is to find a quick way to create this arrow to use for captions in my document. The main elements are the tip of the arrow 2-tone and the circle for a tail. I know that Indesign has a tail of the arrow circle but the problem with its use, it is that the color should be the same as the race and also the size of the circle is determined by the size of the race. As far as I know, Indesign does allow you to change those.

    I tried to use this type of path:

    http://InDesignSecrets.com/making-custom-arrawheads.php

    It works very well, but you can still see the path because the path is flush with the edge of the anchored object and the end of the path is visible behind the anchored objects. I think to be able to define these objects anchored with custom positioning would solve this problem. The problem is that I don't think that Indesign lets you define objects anchored to the positioning personalized text on a path, because this option is grayed out in the anchored object options.

    I was wondering if there is another way to create an offset for anchored objects or if there is a better way to make these custom arrow heads.

    Could there be a way to use objects from a library to create custom arrowheads? Also, is there a way to do this while a style object so that arrows can to shoot quickly and then simply apply the style of the object to get the correct formatting?

    I know that this is not possible and may have to be done manually, but I'll try to find a quick and easy way to make these arrows so that other people who have to use this model won't screw up their.

    Any help/ideas would be appreciated! Thank you all!

    Jacob F.

    Well, if anyone is interested, I sort of solved the problem.

    First, it was decided that the rounded tail of the arrow and the line should use the same darker green color. I still had solved the problem of adjusting the size of the circle but this trick of Eugene Tyson that:

    change the size of the arrowhead?

    Once I did, I made a style of object out of it, so that I can quickly draw lines, and at least add the tail quickly.

    As far as the head is concerned, I still have not found an automated way to do, but I have an easier way than what makes from scratch. I was directed in the right direction with the help of type on a path, but I was able to get the arrow flush with the end of the path and not past it. I saw a tutorial on Lynda.com, that shows you how make arrowhead custom and found a missing piece of the puzzle. It turns out that InDesign uses the same grips that you get when you add the type on a path in Illustrator. The trick to get the anchored object overlap the end of the path is to adjust the object anchored using these handles... After that, the axis of the anchored object y can be adjusted manually with the selection tool. Note that only the y axis (which is actually your baseline) can be modified because InDesign does not allow embedded objects that are typed to a path using a custom positioning. At this time, I don't bother centering the text on the path because the y-axis for my form must be adjusted in any case.

    So that's the solution I came up with that. If someone wants to share a solution better or more automated, I would really like to hear it.

    Thank you!

  • At the end of my mind: placing anchored object inline with text &amp; wrap

    I never learned to InDesign that I had granted.  Once I managed well with Aldus Pagemaker.  But I just spent the last two hours trying to solve a huge gap in my knowledge and I can't do it.  I'm exasperated and desperately need help.

    What I want to do: I have a tech with a lot of text manual and did need to place graphical objects in a way that the text will be around the object and if I need to edit the text, the graph will move with which I inserted the chart.

    What's happening:

    1. I have a block of text with the text.  I place the cursor at the beginning of the paragraph, and then click file > place, then choose a graphic.

    2 using the selection tool, I click the image and then click the 'wrap around bounding.

    3. the text moves a tiny bit but not wraps around the object.

    4 object is, however, / rooted, inline with text.

    OR

    1. with nothing selected, click on file > place, then choose a graphic.

    2. I place the graphic on the lower part of the page on an empty space.

    3. I move the chart on the text and then click the icon 'wrap around bounding.

    4. the text flows but when I change the text, it does not flow in the graph.

    Conclusion:

    I'm retarded.  I even went through the example of Lynda here: http://www.adobe.com/designcenter/video_workshop/?id=vid0073 I was able to place my object in its document and look at the wrapped text to flow around the graphic text.

    I read the help documentation (I'm a big fan of reading).

    The only thing I can think is I put my text box to the top wrong or I don't know.  I'm so frustrated that I seriously almost in tears.

    My sample document (I am under a NDA and cannot release my original document, but I have reproduced what I did in the other) is here to someone who can tell me what I did wrong.  Thank you kindly.

    http://www.Xandria.ca/Test01.indd

    You are not delayed. Text wrapping is not intuitive with anchored objects.

    For items online, dressing affects only the text after the inserted object. For custom anchored objects, it only affects the text beyond the line where the anchor point.

    Often, this means that you do intuitive tricks to get things working as you want, like putting the anchor in its own paragraph, or advance on where you thought, it should be.

  • How to align the two side by side anchored objects in InDesign.

    I put a Word document in my InDesign doc and there are a number of images. They came as embedded images. Some of them I want to appear side by side or in a grid of all kinds. I'm not too familiar with anchored objects. Is there an easy way to align the ups and downs (i.e. ensure that the images are of the same height as the other) so that when they are side by side, they're aligned? Whatever I do for them seems to move them a little bit, but they are not perfectly aligned. Because I can't pick them out and do a typical line up as I would with ordinary objects, I don't know what to do. Sorry if this is a stupid/easy question. Thank you very much!

    • Right-click on the selection of an anchored object and choose anchored object > Options.
    • In the anchored object Options dialog box, choose Customize from the Position menu and click OK.
    • The subject will probably move when the dialog box closes, but because it is now a Custom anchored object, you can drag to reposition.
    • Alignment of an object embedded custom to other objects cannot be done with the control panel features line up because the anchored objects select individually, but with benchmarks commented under tension, you should be able to logically position.

    Note: you can of course always UN-anchor an object if you want. Simply select cut, press ESC to kill the active insertion point and paste.

  • the best way to build a layer Anno... Anchored objects... Script?

    I did some research on this problem for a while and decided that a script may be what I need...

    I have a 100% manual. The next step is to add an Anno ("annotation" or "teacher) layer on the student text, to create the version of the book, which will be sent to teachers. This layer must be able to be easily toggled so that we can keep a Master file for the SE (Student Edition) and (teacher YOU Edition).

    The text of Anno is 100% Magenta inside a white box 90 per cent of fill with a light shade. The easiest way would be to just a layer separated from Anno above all. BUT... in the future when changes are made which change the length of the line, the Anno layer must be changed manually to match the text editing. We try to avoid this.

    It would be great if I could place the Annos as objects anchored in text and then move the objects anchored to their own layer... but I can't do it. I know objects can have turned on/turned off visibility in the layers palette, but it is heavy to turn many individual objects one at a time on many different pasta spread. (It is a book of 500 pages).

    Is there a way to create these anchored objects - many Anno objects through many differences - and in some sort link them together so that they can be turned on/off at the same time, or somehow that it would be easy to the toggle the tag?

    Other suggestions?

    Screen Shot 2015-05-13 at 12.34.31 PM.png

    Anno boxes can go anywhere on the page, even on the existing text.

    Screen Shot 2015-05-13 at 12.34.43 PM.pngScreen Shot 2015-05-13 at 12.34.57 PM.png

    better yet, you can use the conditional text in indesign feature, which was created specifically for this problem (I think that used official documentation actually editing teacher vs student of a document to illustrate how to use)
    https://helpx.Adobe.com/InDesign/using/editing-text.html#use_conditional_text

  • Why skin does not work on an anchored object?

    Hello.

    I have a (custom-place as opposed to online) anchored object itself:

    He has a style applied object and (as you could see in the snapshot) the style of the object has text wrap appllied to it.

    Why the anchored object only are the underside of the film and not the right and top?

    Any help would be appreciated.

    Thank you.

    For custom anchored objects cover only affects text after the line where the anchor point.

  • How to change the paragraph style to each paragraph that contains only one anchored object?

    Hello

    I have a document in word that should be converted in indesign. The document contains instructions, each step followed by an image.

    I managed to import the document into Indesign and applied a paragraph with numbering style to everything (text, image).

    Now, how do I change the the paragraph style to each paragraph that contains only an image? I need to get rid of the numbering.

    Thanks in advance.

    If the images are all anchored objects, you can use find/replace to find the anchor point and change the paragraph style only once for all paragraphs.

  • Select the anchor of the anchored object marker

    Could you help me find the script, select the anchor as the character marker in the text of the anchored object already selected.

    It would be

    app.selection[0].parent.select();
    
  • Is anyway for anchored objects to still be top of the line?

    When I copy an object (say a picture) in InDesign with the tool move (V) selected and then paste it into the text sometimes it's above the line and sometimes it's online. Text wrapping seems to make no difference.

    When I copy an anchored object that is well above the line and the text flows around him and then somewhere paste it elsewhere in the text, it turns into inline. How can I get these always being above line instead of having to change all?

    Change one of them to be above the line (preferably the first time you anchor)

    With the anchored object in the desired position - go to object Styles and create an object for your anchored image style and apply it.

    Now, copy and paste the object to another location in the text.

  • Anchored object Insert window beyond my screen borders

    Hello

    I don't know exactly how I managed to do it, but when I try to insert an anchored object (object - anchored object - insertion)

    the window that opens is actually longer top to the bottom of my screen, and I can not enter the top border to move it, or see my buttons OK or cancel, on the bottom.

    How can I select the window to resize it?

    Thank you!

    Once you access the edge, can you resizee the window?

    You can find instructions to reset the preferences to change your preferences

  • Find the angle of rotation of the anchored object, replace that specific object by letter

    I got indd file customer. General problem is that he described certain letters of the words.

    In fact, he described the letter e and that it rotates 180 °. It also makes with the letter c and there a rotation that anchored-178, 8250 ° oppose.

    Now, I tried to change this objects to the real letters. Problem is that I can't find the option for the rotation of an object in the Find/Replace dialog box, and also I can't fint in Grep. So, what are my options?

    Thanks in advance...

    PS. If there is a possibility to change one of them, I can change a second with finding anchored object and change it to specific letter...

    Looks like someone could not find the real schwa or o open on their keyboards

    Possible, but tricky.

    This Javascript will search history containing the text for items cursor which rotated 180 degrees and replace them with a question mark. Replace the question mark with the character really wanted in notation Unicode Javascript ("\u... ("-here character four-digit hexadecimal code).

    It really isn't a good way to check if it really is one that you should be replacing, so it does not blindly on all 180 degrees of rotation objects...

    (You can simply change the "180" to your another number to check the other characters).

    all_text = app.selection[0].parentStory;
    
    for (thingy=all_text.allPageItems.length-1; thingy>=0; thingy--)
    {
         alert (all_text.allPageItems[thingy].rotationAngle);
         if (all_text.allPageItems[thingy].rotationAngle == 180)
         {
              all_text.characters[all_text.allPageItems[thingy].parent.index].contents = "?";
         }
    }
    
  • [CS4 |] JS] move anchored object does not change its geometricBounds

    Hello scripters.

    in my Indesign document I anchored objects like sidenotes, sometimes they are overlapping.

    To do this, I'm trying to move until they overlap, I used the following script:

    myInlineRectangles [k] .move (undefined, [0, -2]);

    I put this line in a while loop to move the object (until he do not overlap).

    It works, it moves the object (although I read that it is not possible). The only problem is that the geometricBounds remain the same.

    As I am comparing the geometricBounds in my "all-State" it ends in an infinite loop.

    Why the object does not change its geometricBounds after moving?

    How to avoid this?

    Thank you very much in advance for any response.

    Franzi_ska

    Hi franzi_ska,

    You will need the story containing the anchored object to recompose to get the new geometric limits (after each trip and assuming the anchored object can, indeed, move).

    Thank you

    OLE

Maybe you are looking for