I have a LISP routine which measures between two points using getpoint
, it then creates a table and (well, it will once I've finished anyway) populate the table with figures, based on the measured value.
The problem is when I select the first point, there is no visual feedback of where I selected, such as there is when using the built in distance
tool. For example, in both of the below screenshots, I have chosen my first point to measure from, but not the second where I want to measure to;
How, in LISP, can I add this "dynamic input" (I think thats the correct term?) to give my user some kind of visual feedback that the tool is working as they expect?
The function (getpoint [pt] [msg])
actually has two optional parameters. It looks like you're already using the msg
parameter to display your custom message ("Choose second point"), but you can pass the previous point as the first parameter to get a nice reference line between that point and the crosshairs. For example:
(setq P1 (getpoint "Choose first point: "))
(setq P2 (getpoint P1 "Choose second point: "))
Additionally, there's a (getdist [pt] [msg])
function, which behaves similarly but previews and returns a distance.
(setq P1 (getpoint "Choose first point: "))
(setq P2 (getdist P1 "Choose second point: "))