I wrote this lisp program a couple years ago while learning how to program a DCL.
This routine gives you XYZ data in a convent dialog box.
You can easily copy the data from the dialog box if needed.
The best part is it will display accurate coordinates up to 1/256th!
LISP:
;;;---------------------------------------------------------------------;;; ;;; XYZ.lsp ;;; ;;; Created by Jonathan Norton ;;; ;;; jonathann3891@gmail.com ;;; ;;; ;;; ;;; Copyright © 2016 ;;; ;;; ;;; ;;; FUNCTION: ;;; ;;; Identify coordinates/elev of a single point ;;; ;;; ;;; ;;; ;;; ;;; PLATFORMS: ;;; ;;; Tested on 2012 ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED ;;; ;;; WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR ;;; ;;; PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED. ;;; ;;; ;;; ;;; ;;; ;;;---------------------------------------------------------------------;;; (defun c:XYZ () (command-s "UCS" "WORLD") (setq os (getvar 'osmode)) (setvar 'osmode 7) (setq flag 4) (setq PT1 ( getpoint "\nChoose a Point : ") x (rtos (car pt1)) y (rtos (cadr pt1)) z (rtos (caddr pt1)) ) (setq dcl_id (load_dialog "XYZ.dcl")) (while (> flag 2) (if(not(new_dialog "XYZ" dcl_id)) (exit) ) (set_tile "X" x) (set_tile "Y" y) (set_tile "Z" z) (action_tile "Pick" "(done_dialog 4)") (action_tile "Cancel" "(done_dialog 0)") (setq flag (start_dialog)) (if (= flag 4) (progn (setq PT1 ( getpoint "\nChoose a Point : ") x (rtos (car pt1)) y (rtos (cadr pt1)) z (rtos (caddr pt1)) ) ) ) ) (unload_dialog dcl_id) (setvar 'osmode os) (princ) )
DCL:
// //constants edibx :edit_box {edit_limit=20; edit_width=20;} but12 :button {width=12.0;} spwh1 :spacer {width=1.0; height=1.0;} // XYZ :dialog {label="XYZ"; :boxed_column { :edibx {label="EASTING:"; key="X";} :edibx {label="NORTHING:"; key="Y";} :edibx {label="ELEV:"; key="Z";} spwh1; :row {fixed_width=true; alignment=centered; :but12 {label="PICK"; key="Pick"; mnemonic="P";} spwh1; :but12 {label="CANCEL"; key="Cancel"; mnemonic="C"; is_default=true; is_cancel=true;} } } }