(defun c:STA_Ordinate
( / ) (defun ucsl
( / ent enx
) (if ;; If the following expressions return a non-nil value (and ;; If ALL of the following expressions return a non-nil value (setq ent
(car (entsel "\nSelect Line: "))) ;; Prompt the user to select a line ) ;; end AND
(command ;; Evaluate the following expressions at the command-line "_.ucs" ;; Invoke the UCS command
"_non" ;; Ignore Object Snap for the following point
(trans (cdr (assoc 10 enx
)) 0 1) ;; Pass the start point of the line (in UCS) "_non" ;; Ignore Object Snap for the following point
(trans (cdr (assoc 11 enx
)) 0 1) ;; Pass the end point of the line (in UCS) "\\" ;; Pause for user input
) ;; end COMMAND
) ;; end IF
(command "_view" "S" "Ordinate_V") ;; Save ordinate UCS )
(while (< 0 (getvar 'cmdactive
)) ;; While the command is active, pause (command "\\") ;; Pause for user input ) ;; end WHILE |;
(command "-view" "R" "UCS_Origin" "") ;; Reset Origin UCS (princ) ;; Suppress the return of the last evaluated expression ) ;; end DEFUN