Understanding the gp:FindMovedPoint Function
 
 
 

The gp:FindMovedPoint function contains some very powerful LISP expressions dealing with list manipulation. Essentially, what this function does is compare the list of the current polyline points (after the user dragged one to a new location) to the previous points, and return the keyed list (the 13 <xvalue> <yvalue>) for the moved point.

The best way to figure out how this function works is to step through the code and watch the values that it manipulates. Set a breakpoint right at the first expression (setq result . . .) and watch the following variables while you step through the function:

The mapcar and lambda functions will be examined in the following section. For now, however, follow the comments in the code to see if you can understand what is happening within the functions.