Unlock all objects in document(s)?

Community Beginner ,
Aug 31, 2011

Copy link to clipboard

Copied

I suspect the answer is no, but is there a way to do this? I've got 60 files originally made by rhesus monkeys and they found the "lock" command.

Thanks.

Ariel,

There is no need to loop through allPageItems. It's just slow and pointless.

allPageItems returns all items no matter if they are grouped or not.

If you noticed, you can't lock object which is inside of group.

Therefore, using simple one line of code you can unlock all

items in the document like Jongware did in his post:

app.activeDocument.pageItems.everyItem().locked = false;

To unlock items just on master pages use this:

app.activeDocument.masterSpreads.everyItem().pageItems.everyItem().locked = false;

To unlock all items just on pages, not master pages:

app.activeDocument.pages.everyItem().pageItems.everyItem().locked = false;

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Views

21.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Unlock all objects in document(s)?

Community Beginner ,
Aug 31, 2011

Copy link to clipboard

Copied

I suspect the answer is no, but is there a way to do this? I've got 60 files originally made by rhesus monkeys and they found the "lock" command.

Thanks.

Ariel,

There is no need to loop through allPageItems. It's just slow and pointless.

allPageItems returns all items no matter if they are grouped or not.

If you noticed, you can't lock object which is inside of group.

Therefore, using simple one line of code you can unlock all

items in the document like Jongware did in his post:

app.activeDocument.pageItems.everyItem().locked = false;

To unlock items just on master pages use this:

app.activeDocument.masterSpreads.everyItem().pageItems.everyItem().locked = false;

To unlock all items just on pages, not master pages:

app.activeDocument.pages.everyItem().pageItems.everyItem().locked = false;

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Views

21.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 31, 2011 0
Adobe Community Professional ,
Aug 31, 2011

Copy link to clipboard

Copied

I have a hunch that it could be scripted. One of our scripting gurus may answer whether it's possible.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 0
Adobe Community Professional ,
Aug 31, 2011

Copy link to clipboard

Copied

user Harbs has answered this question in an earlier thread:

http://forums.adobe.com/message/2988802

EDIT: or Jongware's answer in this earlier thread:

http://forums.adobe.com/message/3725137

admittedly, searching on the forum's indesign scripting site sucks. user John Hawkinson suggested a better way of searching it. to quote him directly:

Use google instead, you can specify site:forums.adobe.com +"indesign scripting"

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 1
Community Beginner ,
Aug 31, 2011

Copy link to clipboard

Copied

Lovely, thanks.

At least they weren't marmosets, or everything would be on a non-printing layer, too.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 1
Community Beginner ,
Aug 31, 2011

Copy link to clipboard

Copied

While in InDesign, click on 'Object' from the Menu options and select 'Unlock All on Spread'. See if it helps.

Rachit

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 0
Community Beginner ,
Aug 31, 2011

Copy link to clipboard

Copied

Thanks, but there are 1,013 spreads, so I'd like to avoid that.

Got the script running. So far, so good.

Thanks, all.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 0
Adobe Community Professional ,
Aug 31, 2011

Copy link to clipboard

Copied

Untested, but try this little script:

items = app.activeDocument.allPageItems;

for (a=0; a<items.length; a++){

items.locked = false;

}

Ariel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 0
Adobe Community Professional ,
Aug 31, 2011

Copy link to clipboard

Copied

or the OP should try ariel's script above... just tested in CS5 (mac) and it works there.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 0
Community Beginner ,
Aug 31, 2011

Copy link to clipboard

Copied

The simple one works in CS5.5; will try the other if anything changes.

Thanks again.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 0
Advisor ,
Aug 31, 2011

Copy link to clipboard

Copied

Ariel,

There is no need to loop through allPageItems. It's just slow and pointless.

allPageItems returns all items no matter if they are grouped or not.

If you noticed, you can't lock object which is inside of group.

Therefore, using simple one line of code you can unlock all

items in the document like Jongware did in his post:

app.activeDocument.pageItems.everyItem().locked = false;

To unlock items just on master pages use this:

app.activeDocument.masterSpreads.everyItem().pageItems.everyItem().locked = false;

To unlock all items just on pages, not master pages:

app.activeDocument.pages.everyItem().pageItems.everyItem().locked = false;

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2011 3
Adobe Community Professional ,
Sep 01, 2011

Copy link to clipboard

Copied

Hi Marijan,

Thanks that's good. I thought of allPageItems.everyItem() but then I saw

that it returned an array, not a collection, so it didn't work. At the

back of my mind I remembered that there was an object that would work

with everyItem() but I couldn't remember offhand what it was.

Ariel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 01, 2011 0
Adobe Community Professional ,
Sep 01, 2011

Copy link to clipboard

Copied

You didn't say what version of InDesign?


InDesign CS5 you can open the Layers panel, here there is a triangle to expand the layer.

And you can unlock all items by clicking and holding and sliding down the side with the locks on it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 01, 2011 0
Adobe Community Professional ,
Sep 01, 2011

Copy link to clipboard

Copied

Or use the Sub menu and choose "unlock all"

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 01, 2011 0