2 Replies Latest reply on May 17, 2009 6:37 AM by eboda_snaf

    How to tag grouped and position locked images

    eboda_snaf Level 1

      Hey, found that script does not work when the image is being grouped and locked..

        I tried to unlock it's parent first then tag the image.

       

      but...

      There's a problem here, if the image was grouped many times..

      how to unlock ALL it's ancestors??

      What shld be the correct script here... HELP...someone

       

      I'm beginning to hate CS3 and CS4... so many restrictions here and there.

        • 1. Re: How to tag grouped and position locked images
          Dave Saunders Level 4

          It would help if you identified the scripting language you're using and if you provided some indication of your current attempt to solve the problem at hand. Are you speaking of xml tagging?

           

          To unlock all the items in a group, starting with an image in that group, is an interesting little project. I'd tackle it along these lines:

           

          1. Look up the parental hierarchy until to get to a group whose parent is a page or a spread. [If you're allowing for the possibility that the original image is anchored to some text in a text frame that is part of a group, things get a little more complicated because then you'll need the parentTextFrame of character -- and you have to allow for the possibility that the text is overset.]

           

          2. Using the allPageItems property of the group, iterate through each member of the group and make sure its locked property is false.

           

          I don't see how CS3/CS4 is any more restrictive in this regard than was CS2. Do you have a CS2 solution to this issue that doesn't work in CS3? If so, please post it.

           

          Dave

          1 person found this helpful
          • 2. Re: How to tag grouped and position locked images
            eboda_snaf Level 1

            It would help if you identified the scripting language you're using and if you provided some indication of your current attempt to solve the problem at hand. Are you speaking of xml tagging?

            [eboda_snaf] yes

             

            To unlock all the items in a group, starting with an image in that group, is an interesting little project. I'd tackle it along these lines:

             

            1. Look up the parental hierarchy until to get to a group whose parent is a page or a spread. [If you're allowing for the possibility that the original image is anchored to some text in a text frame that is part of a group, things get a little more complicated because then you'll need the parentTextFrame of character -- and you have to allow for the possibility that the text is overset.]

            [eboda_snaf] will try that, btw you have any samples?

             

             

            2. Using the allPageItems property of the group, iterate through each member of the group and make sure its locked property is false.

             

            I don't see how CS3/CS4 is any more restrictive in this regard than was CS2. Do you have a CS2 solution to this issue that doesn't work in CS3? If so, please post it.

             

            [eboda_snaf]

            In CS2, using the direct selection tool, I'm able to select and tag the image even if it's grouped and locked, no script needed at all, no sweat and fast!

            In fact we are doing that currently.

             

            In CS3 and CS4, I can't do that. It will give a stupid warning message "Cannot modify elements that contain locked content, or are contained by locked content. Please unlock or check out the content and try again."

            So need to unlock the parent first. To make matter worse, grouped objects will need to unlock all the great great great grandparents first!

            Such a hassle, just doing a simple xml tagging task.

             

             

            Dave