5 Replies Latest reply on Aug 24, 2010 2:26 PM by Seth McGraw

    unlocking groups

    Seth McGraw Level 1

      Javascript for CS1-CS5.


      I can find locked groups...  groups.locked = true

      I can find how many groups...  groups.length


      I need to identify an object group and unlock it. Can anyone help with this?


      CS1 &/or 2 may have different syntax for the same thing.

      I will need to know that too if anyone can help.


      Thanks a bunch,


        • 1. Re: unlocking groups
          brettpolo Level 1

          I'm a bit unclear on what you're asking...


          Do you want to unlock every group in a document/page?


          Also, groups.locked won't work, as locked isn't a property of groups.  If you want to unlock every group, you should be able to use


          groups.everyItem().locked = false


          so, for every group in a document, you would use


          app.documents[0].groups.everyItem().locked = false


          and for every group on a page:


          app.documents[0].pages[0].groups.everyItem().locked = false


          I don't have CS1 or CS2 installed right now, so I can't test on either of them, but i'm fairly sure that this should work.


          If you're looking for something else, I'm sorry I misunderstood your question, but if you can be a bit more specific about what exactly you're trying to do, I'll do my best to help,



          1 person found this helpful
          • 2. Re: unlocking groups
            Seth McGraw Level 1

            We can try what you've suggested, and if it works, that would be sufficient, however it would be nice to be able to specify which group we would like to unlock.


            We have a template that contains two object groups. In a perfect world only one of these will be unlocked during the running of the script. We are unsure how to identify the groups and then unlock.

            We will check out what you've supplied for the doc and get back with you.




            • 3. Re: unlocking groups
              Seth McGraw Level 1

              It didn't work. It may be because the content is on the document master (A).

              Anything else I can try?




              • 4. Re: unlocking groups
                Seth McGraw Level 1

                It worked by removing



                Thanks a bunch.

                • 5. Re: unlocking groups
                  [Jongware] Most Valuable Participant

                  Only because it now ungroups all groups in your document (But yes, that includes ones on master pages.)