Product : Engine, Version : 4.1.6.1028, ArticleID : 41023344

HowTo : Coordinates are not in consistent with the drawing (via bounding box-polylines)

Article41023344
TypeHowTo
ProductEngine
Version4.1.6.1028
Date Added12/19/2003
Submitted byTakis
Keywords

Subject

Coordinates are not in consistent with the drawing (via bounding box-polylines)

Summary

When I capture the data for a polyline via Boundingbox then compare the mouse move coordinates to the captured values they are not in consistent with the drawing.

Solution

The VDPro1_CoordMouseMove returns the coordinates in DCS (Display Coordinates System) The BoundingBox always returns values in WorldCS.
So the best way is to take the coordinates in VDPro1_CoordMouseMove with cursorpos (returns the coord. in CurrentCS) and convert them to WCS like below.

Private Sub VDPro1_CoordMouseMove(ByVal Xpos As Double, ByVal Ypos As Double)
Dim aTemp As Variant

    aTemp = VDPro1.CursorPos
    VDPro1.Utility.CCSToWorld (aTemp)
   ' Code here for : Check the atemp with the Polyline's bounding box
 
End Sub