PDA

View Full Version : object boundingbox from Layout



rom
05-17-2008, 04:31 PM
Hi all
Is it possible to get the boundingbox of an object with LScript
I have tried using boundingbox() but it crashes Layout.

evenflcw
05-17-2008, 07:54 PM
You'll have to use the position(<layerindex>) method of the Mesh Object Agent. There's code elsewhere on this forum on how to get the layer index.

rom
05-17-2008, 08:48 PM
Many thanx for the pointer.
I'll check this out,
however, what i am after is not the position, but
the coords of the extremities.
I would like to use this data to create a camera and then frame up an object on the fly.

Dodgy
05-17-2008, 11:26 PM
.position(layer) does give the BBox in layout. Read the docs on the command..

walfridson
05-18-2008, 01:47 AM
http://www.newtek.com/forums/showthread.php?t=63158&page=2&highlight=bbox
This is usefull for getting the layer number, using just the position on an object don't work on layers.

rom
05-18-2008, 03:46 AM
Thanx to you all
this info has been very useful