cancel
Showing results for 
Search instead for 
Did you mean: 

How to get coordinates of an object into a Diagram

Solved
Highlighted
Contributor

How to get coordinates of an object into a Diagram

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
MEGA

Re: How to get coordinates of an object into a Diagram

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