@ScottMC I don't see any functional problems with it, other than as Nikon said, you should use the "_." before commands, even though they are not strictly necessary.
FYI - The "." (dot) ensures the actual AutoCAD command is used, in case it has been redefined, and the "_" (underscore) allows the command and any options within it to be used in any localized language version of AutoCAD. Example in your routine: (command "_.chprop" "_L" "" "_la" "XLINE" "")
Additionally:
1) You should also reset your "cursorsize" variable at the end of the routine: (setvar 'cursorsize 100)
2) You are resetting an undo mark in your error routine, and you never included a starting undo mark, i.e. (vla-startundomark (vla-get-activedocument (vlax-get-acad-object))) at the beginning of the routine.
3) Your routine or file should have (vl-load-com) if you use the Visual LISP ActiveX functions in #2 above.
4) You don't need a (progn ...) statement within a (while) loop. (Added)
That being said. I cannot properly test the purpose of the "zpoint" function without knowing in what context you are using it, i.e. a sample drawing situation to test with? Otherwise I don't really understand your purpose for it.