🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2356

Re: move images to other layer with Javascript

#2356
From: loic_aigon
Date: Tue, 30 Dec 2008 17:50
16 lines
1223 bytes
//Send all graphics into a specific layer and set this layer to non visible and non printable.

var doc = app.activeDocument;

//Get a collection of graphics in the doc
var imgs = doc.allGraphics;

//Loop through the graphics in the collection
for(i=0; i<imgs.length;i++) { 	//use function move(to) to place graphics in layer named myLayer 	imgs[i].parent.move(doc.layers.item('myLayer')); }

//Set myLayer layer options to be not visible and not printable
doc.layers.item('myLayer').visible=false;
doc.layers.item('myLayer').printable=false;

Hope it helps
Loic
Technical Details
Message-ID: <59b76331.1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!news2!feeder.erje.net!news4us.nl!webcrossing
References: <59b76331.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,b1467d2683cd2857
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: loic_aigon <loic_aigon@yahoo.fr>
Newsgroups: adobe.scripting.indesign
Subject: Re: move images to other layer with Javascript
Message-ID: <59b76331.1@webcrossing.la2eafNXanI>
Date: Tue, 30 Dec 2008 09:50:36 -0800
References: <59b76331.-1@webcrossing.la2eafNXanI>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!news2!feeder.erje.net!news4us.nl!webcrossing