Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing Shape cordinates in Visio

Status
Not open for further replies.

markusj

MIS
Jan 16, 2003
6
US
Hi,

I am tyring to find out the X and Y co-ordinates for a shape in Visio.
(Original drawing was made in AutoCad)

I can find out the text of shapes in a layer by referencing the
oShape.Characters but I need to find out the X and Y co-ordinate of a shape.

e.g

oShape.XCordinate
oShape.YCordinate

Any help would be greatly appreciated

Thanks in advance

 
You can find the X and Y coordinates of a shape by right-clicking on the shape and selecting "view" then "size & position". This will place a Size & Position box on your screen that will display the x & y coordiantes (in whatever unit of measure you have set) as well as the height and with, angle, and pin position (center of rotation). To find the same information for another shape, just select the shape and the information in the box will display information pertaining to the shape selected.

The x and y coordinates are from the lower left corner of the drawing (which is 0,0).
 
Hi Dave, thanks for that but I am actually trying to do it 'on the fly' using VBA.

Thanks in advance
Markus
 
By the way, the x and y coordinates refer to the pin position. To find, for example, the x and y coordiantes of the lower left corner of the shape, move the pin to the lower left corner of the shape. You can do this either by clicking on the rotation icon and dragging the pin, or by clicking in the pin pos area of the Size & Position box and selecting a position from the drop down menu. Sorry, should have made this part of the first post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top