2 Replies Latest reply on Sep 18, 2012 2:35 AM by loulou2003

    ungroup all groups of an indesign document

    loulou2003

      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