I would like to draw a circle in MapInfo exactly 0.9Ha in area.
I've done it by working out the corresponding radius should be, drawing a circle of arbitrary size, double clicking on it and then entering the radius. Is there a tool to do this?
If there isn't a tool for this then I'm going to make one, so I have another question: how do you programmatically get the geographic coordinates of a mouseclick?
Best Answer
Just sue the CreateCircle method in the MapBasic window, or just put it behind a quick and dirty dialogue with all the maths worked out behind the scene
Create circle in MapBasic
As for capturing a mouse click, Read the MapBasic Manual especially "Create ButtonPad statement", but you'd have to write some custom code for this, a bit like this:
Use the CommandInfo() function with the CMD_INFO_X and CMD_INFO_Y parameters and you can retrieve the info from the point you click on
from here, you can bring up a dialogue/code, with which you can then add the createCircle functionality Ex.
You'd have to click the button each time you wanted to capture a point.
EDIT
Please note, I have not written MapBasic code for a couple of three years, so please have a look at the user/reference guide before you commit this to production data or anything silly like that. I am sure this is how you'd do it, but make sure first please.