Ungroup all groups of an indesign document

hi
i develop an indesign extension with CS extension builder 2 and flashbuilder 4.6 and i want to ungroup all the groups of a document.
I've tryed :
function breakgroup(qui){
for (var g=0;g<qui.length;g++)
                                                  if(qui.item(g).locked){
                                                            qui.item(g).locked=false;
                                                  if(qui.item(g).groups){
                                                            degroup(qui.item(g).groups);
                                                  qui.item(g).ungroup();
breakgroup(app.documents.item(0).groups);
but it doesn't ungroup all the group, is it a better way ?
thanks
Simon

Hi,
Try this (loop backwards):
for (var g = qui.length - 1; g >= 0; g--)

Similar Messages

  • Ungroup all groups then create a single group

    Hey
    I'm having trouble getting a script together where I can ungroup all groups in a document, then put everything under a single group. Everyhting I'm working with has a single layer, but for some of the arts I'm importing have groups within groups ect. To run certain actions I've made properly after I need eveything to be in one, single group.
    I searched for an answer and found this (wirtten by Carlos Canto)
    function ungroup(whereToUngroup, group) // where to ungroup? layer, document, other group?
              for (i=group.pageItems.length-1; i>=0; i--)
                   group.pageItems[i].move(whereToUngroup, ElementPlacement.PLACEATBEGINNING);
    But I'm having trouble getting it to work.

    ok, that's fair...
    Functions 101 - you don't suppose to change anything, you suppose to build one (or someone else) and use it and re-use it. You just provide the parameters the function was build to receive.
    to call the function (to use the function) provide it with your own parameter names, they don't have to match the original function names.
    var myGroup = blablabla....the group you want to ungroup
    var myDestinationGroup = blablabla....the group where you want the items once ungrouped, this could be a Layer or a Document
    ungroup(myDestinationGroup, myGroup); // call the function
    since you're new to scripting and new here, I would suggest start off good and mark your questions as "correct" (or answered, I don't remember) whenever you get a satisfactory answer to somewhat close the thread, you don't have to if you think you didn't get the answer you were looking for.

  • How to ungroup all grouped tabs

    How do I ungroup several tabs that are in a group without having to drag each tab one-by-one and move it to space on the background? Or, how to I ungroup ALL grouped tabs at once?
    Related to this: How do I close several groups at once and either close all included tabs or keep all included tabs and moving them to one group?

    Bookmarks menu > Add These x Tabs to Reading List
    Click the Reading List icon:
    I think that is as good as it's going to get.

  • All Group to Ungroup Script

    Download Link
    http://www.cyworld.com/be2u/2801831
    Feature
    This Script  is Can be easily  ungrouping to all group items in the Document.
    if find Bugs or Error, contact to me plz.
    License type
    Freeware
    Author
    Nokcha
    Author Contact
    [email protected]
    Author website
    http://be2u.tistory.com
    http://www.cyworld.com/be2u
    Date published
    june 30, 2009
    Compatible product
    Illustrator

    Did you even google it?!  Have a look here.

  • Ungroup All Items with JavaScript, Illustrator CS6

    I'm working on pretty complicated Illstrator files. Each file has 20 or so layers, and many of those layers have multiple sublayers. Each of those sublayers contain many grouped items, and those grouped items contain additional grouped items. And so on. There's literally hundreds of groups in each file, and I don't want to manually ungroup them.
    So I'm I writing attempting to write a Javascript to ungroup all grouped items and keep them inside the correct layer. I'm new to Javascript and new-ish to the concept of recursion. My idea is to loop recursively through all the layers, then loop recursively through all the grouped items, then move all items above the grouped items. That seems to be what other people have demonstrated on this forum (or at least how I understood it). I'm posting a screenshot of what I've written so far. What I have ungroups many groups, but errors out eventually. Any replies, ideas, or references would be greatly appreciated. Thanks.

    I think you will find some resources in the Illustrator Scripting forum.
    http://forums.adobe.com/community/illustrator/illustrator_scripting
    Do a search for "ungroup" or something similar.
    http://forums.adobe.com/message/2077311#2077311

  • Moving picture achieve - relinking Indesign documents

    We are about to move our picture archieve to another server. I'm afraid that this would result in broken links in all our thousands og Indesign documents. Is there an easy way to do this so we don't have to relink evrything manually? maybe some piece of software?

    Basically, InDesign looks for absolute paths for linked objects. If your other server's absolute path (including drive name and folder name) matches with that of the current server's absolute path, then you won't need to relink the documents and files. The path (folder structure) has to match exactly as defined for each link in your current documents on the present server.

  • Would like to create a script for list all elements and structure of an indesign document

    Hello everybody,
    I'm a very beginner in indesign scripting.
    I would like to create a script in order to list all elements and the inner structure of a n indesign document.
    The aim for me is to understand how elements are sorted and arranged into indesign, and be able to find an specific element by its item name.
    The output document could be an xml or txt document with a treeview structure.
    I would like have a rough idea of which kind of javascript code I should use for that.
    Thanks for answers.

    Hi Ossydoc,
    You can use Muse to create such a website. All you need to do is, create links in Muse for the sermons and select  " link to File " in the hyperlink option and link to those Mp3 files.
    Please refer to this screenshot :- http://prntscr.com/4xvdup
    Now, when you publish your site,  Muse would automatically upload those files onto the server and the users would then be able to listen as well as download those sermons using the links on your site.
    Hope this helps
    Regards,
    Rohit Nair 

  • Looking for Software that will preview thumbnails of all pages Indesign documents (like Bridge)

    Hello,
    I am trying to build a library of documents. But the problem is, I have to open each document in Indesign to see what's in it. Does anyone know of a preview type of software that will work with indesign documents, and PowerPoint Documents. Kinda like bridge, but will let me preview all of the pages in each document?
    My thanks in advance.
    Jackie

    If you want it for archive disks that are offline CD Finder / Winder does InDesign previews too. Avoid having to load DVD/Tapes/whatever archival media of choice.
    Mac
    http://www.cdfinder.de/
    Windows
    http://cdwinder.de/

  • Packaging large InDesign document - won't copy all links

    I'm trying to Package a 1,000-page InDesign document that has about 375 links for our archive. When I go through the packaging process, however, it only saves about a dozen images or so in the designated folder. Any ideas why it's not taking the time to resave and compile all of the images?

    What operating system specs; OS, RAM, available HDD, network or local?
    Which version of InDesign, are you fuuly patched?

  • Is it possible to link and update external files in a Indesign document when sharing the Indesign file in Creative Cloud with multiple users?

    I am new to Creative Cloud, but have been using Adobe software for many years.
    Now we are considering sharing an Indesign file with my project group using CC.
    The Indesign file contains links to external files (one Illustrator and multiple .txt files); and we export the approved version to an Hi-Res PDF.
    These .txt files are currently hosted on our internal server but have not been linked directly: we first copy them over to local desktop and update the links in Indesign before creating a new PDF. 
    Since these file can be update by different people we would like to keep them outside the Indesign and Illustrator files.
    Is it still possible with CC to link directly to the files on our server in Indesign and see if there have been updated?
    Or can they also be stored in the CC cloud? Or is there another method?
    Thanks in advance for any help or suggestions
    Ronald

    This will work if you all use the file syncing of the Creative Cloud desktop application and then you use the Collaborate option for the folder containing all the files. Then it will work on each of your desktops.
    Links to files will not work in the browser when viewing the InDesign document from https://creative.adobe.com/files.

  • Importing grouped images into InDesign from Word

    Hi everybody. Is there anyone who can help me please?
    When I place work, Edit > Place and then Shift and click. It only place my text up until the first grouped image. But when I ungrouped it in Word, the whole document can be placed. Why can’t InDesign place grouped images from Word, is there a way to do this?
    Thank you!

    Thank you Steve, looks like I'll have to ungroup them first then.
    Thanks for the help

  • Automatically place images within multiple InDesign documents

    I work for a publishing company of agricultural trade magazines and work on few titles each month. We are trying to streamline our production procedures and previous company I worked for had a script they used to place images within text pages by searching for the file name, however there were some limitations with this script (it would only work within 1 InDesign document and only within 1 InDesign story at a time). The company I am with now breaks out each editorial story into separate InDesign files and we place image boxes when the display ads are going to go. For our purposes now, I am looking for a script that, once all of the image boxes were tagged with the image file names, could search between multiple InDesign documents in a folder and automatically place all the images for us. Is anything like this available or able to be created? If so, would it have the capacity to search between multiple InDesign documents and search the entire document for the image file names? Any help would be greatly appreciated!

    Hi Kasyan,
    They were tagged using a program called Pathways created by a computer programmer the company used at the time. The issues that I was working on were annual Buyers' Guides so they were mainly just listings and inline graphics. The kinds of issues I work on now are monthly issue with various stories and no inline graphics, but display advertisements. And each story is created and laid out in a separate InDesign document. So I would need a script that can search an entire group of documents for file names and/or image boxes instead of just in one story in one document for inline graphics. (sorry if this is confusing).
    I currently do not have a script to work from and am looking for something new that can be used to save use the time of placing every ad manually.
    Thanks for your help and feedback!
    Matt

  • Is it possible to place an InDesign page into the same InDesign document

    I'm able to place an InDesign page into another InDesign document, but am not able to place an InDesign page an InDesign document when the page is part of the same InDesign document. Is there any way around this limitation?

    PDF is the better bet (although you might as well save a copy of your document). Snippets have all kinds of problems for this because of master items and the fact that from a script you can only export individual items as snippets (although you can group them and export that).
    Dave

  • Is there any way to get the height/width of an image before importing it in the indesign document.

    Hi All,
    I need to obtain an image's attributes such as dimensions (height, width in pixels) without placing image in indesign document.
    I have full path of the image (say abc.jpg is stored at c:\my pic\abc.jpg).
    I have obtained the IDFile for this image, tried getting size using GetFileSize() which correctly return size in bytes.
    Is there any way to get the height/width of image without importing it in the indesign document.
    Please, give me some hints. I have spent quite a lot time digging in CHM. I have searched in FileUtils, IDFile API's but found no method which serves this purpose.
    At this point I am clueless where to search next.
    Any help will be appriciated.
    Just a point to mention, I am able to get image height and width for an image in indesign doc though Its not my requirement.
    Thnx,
    D.

    You might be able to examine the contents of the PlaceGun after calling kImportAndLoadPlaceGunCmdBoss without actually placing the image in a document. Not sure, but would be worth looking at.
    Otherwise you will probably have to write platform specific code, ideally with a generic platform-independant wrapper (see SDKSamples/paneltreeview/PlatformFileSystemIterator).
    For the Mac, look at CGImageGetWidth() etc., not sure what the best option is for windows.
    Perhaps Quicktime could provide you with a platform independant solution.

  • How to embed data into an InDesign Document

    Hello everybody,
    I'm porting a QuarkXTension to InDesign CS3 on PC but, maybe, I've found a showstopper...
    The current xtension writes some collected data into a document slug that is retrieved by an external application simply scanning the content of the file.
    I need to maintain the same way with InDesign but I've discovered that the persistent data added to a document workspace doesn't stay all together when is more than few KBytes (everything seems to be ok until 2 KBytes but that's too little) inside the InDesign document but is scattered on many locations. Of course this makes the work of the external application impossible.
    Is there any way to command/force inDesign to write the persistent data insidde the file in one single chunk?
    I understand this is something unusual but that's the way that complex publishing workflow works and can't be changed in that part.
    Thanks a lot in advance for any help.
    Best regards,
    Luca Severini

    I think I have found a possible solution to embed my data in a way readable by an external application. To use the XMP toolkit.
    Very interesting the fact XMP Toolkit includes the source of a simple command line tool that parses the xmp embedded into InDesign file.
    The same source can be easily modified to get all the objects contained in the document aka database.
    Bye
    Luca

Maybe you are looking for

  • Is There an Easier Way to Save a PDF for Perfect Binding?

    I've always had this problem whenever I do a booklet or magazine that will end up perfect bound: I have my document setup in CS6 with "facing pages" so I can easily design spreads with images and backgrounds that span both pages. Usually, when it pri

  • Verizon

    I am so angry at Verizon. You can't talk to a human. I went to VerizonWirelessSurvey to complain, it says the website is insecure, I spent 20 minutes logging on to this mess just so I can vent. I spilled Monster on my Blackberry today. I am the Direc

  • 2 Ipods on the same library?

    I have an Ipod, and my girlfriend just picked up a Nano. Is it possible to work both off the same library? She doesn't want to start a new library of her own; she just wants to move some songs from my library onto her Nano. Is this possible and is th

  • PDF signature data

    Dear Experts, I have included a Interactive PDF document UI element in a WebDynpro component filling the PDFsource attribute of the UI . Now when the webdynpro application is executed I could find the PDF document displayed in browser. When I make ch

  • How to make / edit playlists by genre..ex. country.. rap..r

    how do i edit a playlist on my zen micro? when i create a playlist it just pulls all of my songs into that playlist , i can't put indivual songs into different playlists, so i have big playlist.... HELPDG