Hello,
I have an app that selects a polygon, gets the centroid and pastes a custom label and point at that same coordinate on a different layer/table.
Code:
frmMI64._application.RunMapBasicCommand("select obj from bpoly where bpoly.lotplan = " & """" & lp & """" & "into xxx", False, False)
Dim nn As Integer = frmMI64._application.EvalMapBasicCommand("tableinfo(xxx ,8)", False)
If nn <> 1 Then
frmErrors.tbErrors.Text += "*Error - LotPlan - " & lp & " - could not be located in BPoly" & vbCrLf
End If
frmMI64._application.RunMapBasicCommand("fetch first from xxx", False, False)
'??? why is this not returning enough precision?
Dim ee As String = frmMI64._application.EvalMapBasicCommand("centroidx(xxx.obj)", False)
Dim ss As String = frmMI64._application.EvalMapBasicCommand("centroidy(xxx.obj)", False)
The trouble I am having is the returned values are only to 3 or four deep decimals of degrees, and so the points are in the vicinity, but not right.
I thought this might be a string conversion issue so I tried other data types to no avail.
Thanks for any assistance
Paul
------------------------------
Paul Thomas
Cook Shire Council
Cooktown QLD
------------------------------