cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get coordinates of an object into a Diagram

agiovannetti
Super Contributor

How could I get coordinates of an object into a Diagram. I could see DrawingItem method "setPos....", does exist the getter method too?

1 Reply

lionel
MEGA
MEGA

Ciao Andrea,

 

you have to use the "left", "top", "right" and "bottom" properties of your drawing object.

 

For example :

 

Set myDiag = getObjectfromId("xxxxxx") 'Where "xxxxxx" is the _idabs of your diagram
Set oDrawing = myDiag.drawing("RW")
For each oDrawingObject in oDrawing.DrawingObjects
If oDrawingObject.getId = "yyyyyy" 'Where "yyyyyy" is the getId of the concerned object msgbox "Left : " & oDrawingObject.left & vbcrlf &_ "Top : " & oDrawingObject.top & vbcrlf & _ "Right : " & oDrawingObject.right & vbcrlf &_ "Bottom : " & oDrawingObject.bottom Next

 

Regards,

 

Lionel