Shape position and size 
Author Message
 Shape position and size

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 ...



Sat, 22 Mar 2003 03:00:00 GMT  
 Shape position and size
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)
---------------------------------------------


Sun, 23 Mar 2003 03:00:00 GMT  
 Shape position and size

The final info i need is the position and size for ALL shapes:

With some shapes the 'Shape.Cells("Width/Height")' properties give
correct values and 'BoundBox()' function give wrong values, and some
shapes the 'Shape.Cells("Width/Height")' properties give wrong values
and 'BoundBox()' function give right values

I need 1 way to get position and size for all kind of shapes



Mon, 24 Mar 2003 03:00:00 GMT  
 Shape position and size
Meir:

Please identify or describe examples where you feel Width/Height or
BoundingBox are wrong. It's my belief that these cells/properties always
function as advertised, and that it may be you have expectations of
these that are not what' advertised.

Graham

Quote:

> The final info i need is the position and size for ALL shapes:

> With some shapes the 'Shape.Cells("Width/Height")' properties give
> correct values and 'BoundBox()' function give wrong values, and some
> shapes the 'Shape.Cells("Width/Height")' properties give wrong values
> and 'BoundBox()' function give right values

> I need 1 way to get position and size for all kind of shapes

--
--------------------------------------------
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)
---------------------------------------------


Tue, 25 Mar 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. size and position of shapes

2. Adjust size and position of controls under the change of the Form size

3. Adjust size and position of controls under the change of the Form size

4. Shape position change

5. (Event to) Detect shape position changes

6. Tracking shape position and rotation WHILE moving

7. Inserting shape on fixed position on different pages

8. Shapes on controls and mouse pointer position

9. Shapes shapes shapes

10. InputBox size/shape parameters?

11. Grouping Word XP Shapes changes sizes

12. Creating Auto size Shapes with Visio

 

 
Powered by phpBB® Forum Software