Hi again.
I’ve been talking to one of our coworkers and we came with a sort of pseudocode that might help understand what the routine could go through. It’s already a little different from my original post because we think AutoCAD does not keep track of element edit history down to what vertex was edited last, aside from the undo/redo list.
Before calling the command, the element would already be highlighted.
Here’s the process:
. Call lisp command;
. Get selected element;
. Create list of vertex coordinates for that element (with their vertex numbers as well);
. Prompt: “Click near current vertex”;
. Get coordinate of click/pick pt;
. Calculate difference (distance) from click pt’s coordinates to each vertex of selected element to find out closest vertex on element – that is the current vertex;
. Get current vertex number;
. Copy current zoom/view settings;
. Zoom (or pan) to the next vertex (current + 1) using previous zoom/view settings;
. Re-select element (if it’s not highlighted anymore);
. End lisp routine;
In bold and underlined are the two only interactions with the user - calling the command and clicking on the screen.
Attached is a small screenshot that might help visualize what’s going on.
Thanks one more time for any input.
Edgar