Article View: adobe.scripting.indesign
Article #9011Re: Move Rectangle that image is in
From: Olav_Kvern
Date: Tue, 12 Sep 2006 03:02
Date: Tue, 12 Sep 2006 03:02
25 lines
1600 bytes
1600 bytes
Hi Jeff,
What errors are you encountering? I'm not quite sure what sort of object "rs" in your above snippet is, so I'm not sure what rs.Fields("Image") might be. It's not an InDesign property.
In general, you can move a rectangle by setting its geometric/visible bounds, or by using the move method. Using the latter approach is generally better, as you don't need to worry about resizing the rectangle.
Let's say that you want to move the rectangle to X = 150, Y = 5 on the current page. Here's what you'd do:
oImageRect.move array(150, 5)
To move the rectangle by a *relative* amount (rather than an absolute amount, as shown above), use something like this:
oImageRect.move , array(12, 24)
That will move the object 12 units to the right, and up 24 units from its current location.
If the object doesn't move along, you need to set the TransformContent property of the TransformPreferences object of the application object to True.
Thanks,
Ole
Technical Details
Message-ID:
<3bc19491.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!news.buerger.net!open-news-network.org!news.isoc.lu!webcrossingReferences:
<3bc19491.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,915ae1108be3893a X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Olav_Kvern@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!news.buerger.net!open-news-network.org!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Move Rectangle that image is in Message-ID: <3bc19491.0@webcrossing.la2eafNXanI> Date: Mon, 11 Sep 2006 20:02:53 -0700 References: <3bc19491.-1@webcrossing.la2eafNXanI> Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit