Purpose
Creates a new circle object; corresponds to choosing Spatial > Create > Insert > Circle From 3 Points. This function requires the MapCAD Tool and can be executed via the Exec () command. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
Exec("MapCAD.mbx","CircleFromPointsXY", X1, Y1, X2, Y2, X3, Y3)
Return Value
Circle Object If the function failed the return object is a point(0,0).
Description
Use the CircleFromPointsXY function to create a circle object by giving three-point coordinates.
The MapCAD tool must be loaded. This function requires an active map window to determine the projection and units. To set the calculation accuracy, open the MapCAD settings dialog.
Parameters | Description |
---|---|
X1, Y1, X2, Y2, X3, Y3 | Float values |
Examples
'Creates a new circle object.
Dim NewObj as object
NewObj = Exec("MapCAD.mbx","CircleFromPointsXY", 434204.02,5566829.13,434219.39 ,5566833.997,434218.18,5566852.19)
Insert into [Table] (obj) values (NewObj)
'Updates objects with calculated circles from coordinate columns (X1 ... Y3).
Update [Table] set obj=Exec("MapCAD.mbx","CircleFromPointsXY", X1, Y1, X2, Y2, X3, Y3)