If that is the case, then I would just have the user select the entity desired to act as the path of the extrusion, and just pass that to the extrude command instead of a distance.
You could use one of the points with either 'ssget' or 'nentselp' to select an entity based on a point, and pass that to the extrude command. You will have to change the command call a little, telling it you want to use the 'path' option.
You're welcome.