🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16432

[VB] Detecting and evaluating image dimensions.

#16432
From: B Holt
Date: Mon, 15 Sep 2003 04:41
25 lines
1673 bytes
Hi,

In part of the script i am writing, i need to place a bunch of images and resize them in certain ways depending on their current dimensions.

Here is my code:

Set myImage = mySpread.Place(IMAGELOCATION)
Set myImage = myImage.Item(1).Parent
'Check if the image is too large

If myImage.GeometricBounds(2) > 9 Then
Debug.Print "----------"
Debug.Print myImage.GeometricBounds(0)
Debug.Print myImage.GeometricBounds(1)
Debug.Print myImage.GeometricBounds(2)
Debug.Print myImage.GeometricBounds(3)
Debug.Print "----------"
myImage.GeometricBounds = Array("0", "0", "13p9", "20p5")
End If

I can't get this to work, and the Debug.Print myImage.GeometricBounds() lines print nothing, so obviously I am refering to the image bounds the wrong way. It still places the image, and always evalutes the if condition to true.

anyone know a fix?

thanks
Technical Details
Message-ID: <2ccd6ddf.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.kabelfoon.nl!62.132.236.44.MISMATCH!ecngs!feeder.ecngs.de!npeer.de.kpn-eurorings.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,51ca33d69a228069,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-09-14 22:08:10 PST
From: "B Holt" <holtwj@mcmaster.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.kabelfoon.nl!62.132.236.44.MISMATCH!ecngs!feeder.ecngs.de!npeer.de.kpn-eurorings.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: [VB] Detecting and evaluating image dimensions.
Message-ID: <2ccd6ddf.-1@webx.la2eafNXanI>
Date: Sun, 14 Sep 2003 21:41:48 -0700
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit