Northstar Posted December 4, 2007 Share Posted December 4, 2007 I found a couple of lisp routines for displaying xy values but just wounder if anyone had a routine to show XY & Z. Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted December 4, 2007 Share Posted December 4, 2007 Try this one work ok for me Cord.LSP Quote Link to comment Share on other sites More sharing options...
Northstar Posted December 4, 2007 Author Share Posted December 4, 2007 Thanks, when I run the command the text is upside down and the values look like O Y 2222 Z-1111 Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted December 4, 2007 Share Posted December 4, 2007 Try this one, if it doesn't work for you I have another one which is for survey drawing settings. ;;-------------------------------------------------------------------------- ;; COORDRL.LSP PLACE CO-ORDINATE & LEVEL TEXT OF SELECTED POINT ;;========================================================================== ;;DESCRIPTION: This routine will place co-ordinate text and point level ;; alongside a defined (user selected) point. The `x', `y' & `z' ;; values of the selected point will be preceded with an `E', `N' ;; &`RL' respectively. This routine also places a donut at the ;; point. The co-ord & level text is then echoed to the screen ;; alongside the selected point, and the user is prompted to select ;; the desired location of the text. ;; ;;START COMMAND........ coordrl ;; ;;WRITTEN BY: ALAN CULLEN November 1999 ;; ;;AMENDED: October 2007 Re-written for Tiger ;; ;;---------------------------ERROR HANDLER------------------------------ (defun clerr (s) (if (/= s "Function cancelled") (if (= s "quit / exit abort") (princ) (princ (strcat "\nError: " s)) ) ) (setvar "donutid" olid) (setvar "donutod" olod) (setvar "blipmode" olblip) (setvar "LUPREC" oluprec) (setvar "osmode" olsnap) (setq el1 nil el2 nil) (setvar "cmdecho" ocmd) (setvar "ANGBASE" oangbase) ;;Angle zero direction to "north" (setvar "ANGDIR" oangdir) ;;Clockwise angles (setvar "dragmode" odrag) (if olderr (setq *error* olderr)) (princ "\nERROR...CONSOLE BREAK...PREVIOUS DRAWING STATUS RESTORED...") (princ) ) ;;-----------------------------MAIN PROGRAM------------------------------ (DEFUN C:coordrl () (princ "\n PLACE POINT CO-ORDINATE & LEVEL TEXT - May 2000 - Alan CULLEN") (setq txtang 90) ;;*** Set orientation angle for text (set for 0 deg = North, angles measured clockwise) (setq lnspace 1.5) ;;*** Set text line spacing factor (generally 1. (setq olderr *error* *error* clerr) ;;Set new error handler (setq ocmd (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setq olid (getvar "DONUTID")) (setvar "donutid" 0) (setq olod (getvar "DONUTOD")) (setvar "donutod" 5.0) ;;*** Set outside diameter of donut (setq oluprec (getvar "LUPREC")) (setvar "LUPREC" 3) ;;*** Set number of decimal places (setq olsnap (getvar "osmode")) (setq ts 2.5) ;;*** Set text size (setq olblip (getvar "blipmode")) (setvar "blipmode" 1) ;;*** Set BLIPMODE enviroment variable 0/1 ... 0=OFF, 1=ON (setq oangbase (getvar "ANGBASE")) (setvar "ANGBASE" (/ pi 2)) ;;Angle zero direction to "north" (setq oangdir (getvar "ANGDIR")) (setvar "ANGDIR" 1) ;;Clockwise angles (setq odrag (getvar "dragmode")) (setvar "dragmode" 2) (setq pt T) (while pt (princ "\n PLACE POINT CO-ORDINATE & LEVEL TEXT - May 2000 - Alan CULLEN") (setvar "osmode" 1) (setq pt (getpoint "\n Pick Point (snap set to END) <RETURN> to finish :")) (setvar "osmode" 0) (if (/= pt nil) (progn (setq ptx (car pt) pty (cadr pt) ptz (caddr pt)) (setq txtptx (strcat "E " (rtos ptx))) (setq txtpty (strcat "N " (rtos pty))) (setq txtptz (strcat "RL " (rtos ptz))) (setq pt1 (list ptx pty 0)) (setq txtpt1 (list ptx (+ pty (* 2(* lnspace ts))) 0)) (setq txtpt2 (list ptx (+ pty (* lnspace ts)) 0)) (command "doughnut" "" "" pt1 "") (command "text" txtpt1 ts txtang txtptx) (setq el1 (entlast)) (command "text" txtpt2 ts txtang txtpty) (setq el2 (entlast)) (command "text" pt1 ts txtang txtptz) (setq el3 (entlast)) (prompt "\n Select the Desired Location for Text...... ") (command "move" el1 el2 el3 "" pt1 pause) ))) (setvar "donutid" olid) (setvar "donutod" olod) (setvar "blipmode" olblip) (setvar "LUPREC" oluprec) (setvar "osmode" olsnap) (setq el1 nil el2 nil) (setq *error* olderr) ;; Restore old error handler (setvar "cmdecho" ocmd) (setvar "ANGBASE" oangbase) (setvar "ANGDIR" oangdir) (setvar "dragmode" odrag) (princ) ) Quote Link to comment Share on other sites More sharing options...
jagdishchhugani Posted September 16, 2008 Share Posted September 16, 2008 Try this one work ok for me try this works with 2006 cad , i have 2008 lt but no opttion to load application CORD-LDR.LSP Quote Link to comment Share on other sites More sharing options...
asos2000 Posted August 13, 2009 Share Posted August 13, 2009 Gadi try this works with 2006 cad , i have 2008 lt but no opttion to load application great lisps for the lisp you cant load, may be the autocad version is LT, for the lisp itseld it great but how can i collect in a table Quote Link to comment Share on other sites More sharing options...
gilsoto13 Posted August 14, 2009 Share Posted August 14, 2009 Thanks, when I run the command the text is upside down and the values look like OY 2222 Z-1111 I have used a lisp for this that I renamed to LLP.lsp It will draw a leader usind current dimstyle and after an Enter it will add the X, Y, Z coordinates of the first leader point, using the current text style and size and it will draw a point also in that selected first point. I have modified from its original version to do all these things. LLP.LSP Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 15, 2009 Share Posted August 15, 2009 Guys, bear in mind this thread is 2 years old - you may not get a reply :wink: Quote Link to comment Share on other sites More sharing options...
sharaf2255 Posted April 27, 2015 Share Posted April 27, 2015 Sir, Thanks very much for the lisp. Regards, Sharafudheen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.