1 Reply Latest reply on Nov 10, 2008 6:06 AM by (Dave_Saunders)

    [CS3][JS] Create Group Prior to its Children

      Hi
      Is there a way to create group along with all members in one go?

      What I currently do is:
      ...
      myGroupMembers = [
      myBox01,
      myBox02,
      myBox03,
      myBox04
      ]

      myDoc.groups.add(MyGroupMembers)
      ...



      Obviously, InDesign has to create all group members first and let me stare
      at the partial screen updates as the script runs. This can take quite long
      for 500 item catalogue subsection.

      So I thought there must be a quicker way.
      So far I tried this:

      mySpecs = {
      myItem01: Rectangle{
      label: "01",
      // other properties
      },

      myItem02: Rectangle{
      label: "02",
      // other properties
      },

      myItem03: Rectangle{
      label: "03",
      // other properties
      }
      }

      myGroup = myDoc.groups.add(mySpecs);
      ...

      I based this on ScriptUI resource string. I didn't expect it to work (It
      doesn't indeed). I'm just wondering whether it's only syntax error or flawed
      idea.


      Can anuone help me please?
      Thanks



      Weller