Add spatialsurvey.advance() call to PathData.send().  Register rightClickButton automatically on polylinecomplete.