8 Replies Latest reply on Apr 8, 2009 11:16 AM by yajiv_viki

# Find out height and width of selected content..?

Hi Everyone.!

i'm new baby to indesign script. Actually i link one Eps image to picture box.

now i want the height and width of eps image,angle and also need X and Y coordinates....

anyone help me..?

-yajiv

• ###### 1. Re: Find out height and width of selected content..?

Use either the geometricBounds or visibleBounds properties of the object.

Dave

• ###### 2. Re: Find out height and width of selected content..?

If you're dealing with frames which might have been rotated, you're probably going to want to use visibleBounds.

• ###### 3. Re: Find out height and width of selected content..?

Hi Harbs & Dave !.

Thanks for Quick replay. I get the height and width of the content.

-yajiv

• ###### 4. Re: Find out height and width of selected content..?

Hi Harbs & Dave !..

Thanks for Quick replay. I get the height and width of the content but i can't findout X and Y co-ordinates... exactly i need center position of x and y co-ordinates.. i attach some picture for ur clarification..Thanks in Advance..!

-yajiv

• ###### 5. Re: Find out height and width of selected content..?

y= bounds[2]-bound[0];

x=nounds[3]-bounds[1];

• ###### 6. Re: Find out height and width of selected content..?

Harbs, that gives width and height.

The center point is at (geometricBounds[3] + geometricBounds[1])/2, geometricBounds[2] + geometricBounds[0])/2 (alternatively, geometricBounds[1] + width/2, geometricBounds[0] + height/2 -- which comes down to the same).

As for the angle, rotationAngle sounds about right, but compare to absoluteRotationAngle -- that seems to be a total value for multiple nested and rotated objects.

Oh, and you want the shear as well?  Every graphic item also has a shearAngle and, to top it off, an absoluteShearAngle as well.

• ###### 7. Re: Find out height and width of selected content..?

[Jongware] wrote:

Harbs, that gives width and height.

Yeah. That's what happens when you respond without thinking...

• ###### 8. Re: Find out height and width of selected content..?

Thank you very much for such work..

Jongware and Harbs.

Thanks lot..

-yajiv