Meir:
You don't say exactly what the final info is that you want, however...
Bear in mind that the Width/Height cells establish a "frame of
reference" for the shape, with 0,0 in the bottom left corner, and W/H
determining where Visio will show resize handles and dotted green
outline, and how VIsio will snap shape to grid.
Many shapes are designed so that their geometry is entirely within this
box. Others (such as Triangle) have geometry that extends outside this
box.
Shape location is determined by combining LocPinX/Y (position of "pin)
in shape's frame of reference) with PinX/Y (location of pin in parent
(ie: page or group) frame of reference.
This is described in some detail in DVS.
Graham
Quote:
> After many checks, It is not always clear if the properties of
> 'BoundBox' or those of 'Cells("Width/Height")' and 'Cells("PinX/PinY")
> should be used to get the position and size of a shape.
> There are some shapes that 'BoundBox' gives incorrect values for,
> requiring the use of 'Shape.Cell("Width")' and 'Shap.Cell("Height")' and
> vice versa. It's not consistent.
> Can somebody tell me the right and only way to get position and size
> information of Visio shape ...
--
--------------------------------------------
Graham Wideman
MS MVP for Visio
Book: Visio 2000 Developer's Survival Guide
... and resources for programmable diagramming at:
http://www.diagramantics.com
--------------------------------------------
Unoffical Visio FAQ:
http://www.diagramantics.com/diagenvs/visio/faq/index.htm
(Remove the obvious to email me)
---------------------------------------------