The Courage Dog Posted June 30, 2008 Posted June 30, 2008 Hi, anybody who has the lisp routine that can generate drawing COORDINATES automaticaly, instead of typing ID at the command prompt & taking ID one by one. jake Quote
eldon Posted June 30, 2008 Posted June 30, 2008 Here is a little routine to write coordinates to the drawing. Very simple and no error checking, but it works for me Load and type WC ;WC.LSP is a programme to write coordinates. eldon Nov 1999 (defun C:WC (/ pt0 e east eastin n north northin) ;here begins the loop that gets the actual positions (while (setq pt0 (getpoint "\nPick co-ordinate point: ")) (setq e (car pt0) ;easting coord as number n (cadr pt0) ;northing coord as number east (rtos e 2 3) ;easting coord as string north (rtos n 2 3) ;northing coord as string eastin (strcat east "mE" ) northin (strcat north "mN") ) (command "TEXT" pt0 "0.5" "0" eastin);size of text changed manually (command "TEXT" "" northin) ) (princ) ) Quote
The Courage Dog Posted July 1, 2008 Author Posted July 1, 2008 thank you for your reply.....it really help me a lot. Quote
gerbaux Posted July 3, 2008 Posted July 3, 2008 hey, without LISP i can help you... in my company we use "field" command for coordinates.. we just have to create 1 field and copy copy copy to whichever or wherever you want to know the coordinates and then command the regenerate to refresh the fields.. maybe somebody here can make a code for automatic putting of fields instead of just plain text so when you move the reference point the coordinates will also change... Quote
gerbaux Posted July 3, 2008 Posted July 3, 2008 sorry i'm still new to LISP.. so i can't post my own codes... Quote
ASMI Posted July 3, 2008 Posted July 3, 2008 Two more: http://www.asmitools.com/Files/Lisps/Ordi.html http://www.asmitools.com/Files/Lisps/Ordy.html Quote
The Courage Dog Posted July 7, 2008 Author Posted July 7, 2008 ASMI, this is exactly what i'm looking for... thanks a lot. Quote
asos2000 Posted July 14, 2009 Posted July 14, 2009 ASMI Refer to ordy.lsp could be the coordenate ID and X,Y in a table Quote
Phiphi Posted December 18, 2009 Posted December 18, 2009 Two more:http://www.asmitools.com/Files/Lisps/Ordi.html http://www.asmitools.com/Files/Lisps/Ordy.html Merry Christmas and best wishes to you for a successful New Year 2010. Quote
Emily_83 Posted January 21, 2010 Posted January 21, 2010 hello all, i am wondering if the lisp routine that eldon posted above, could be modified to select multiple points and place the x,y beside each point?? is this possible?? any help would be appreciated Emily Quote
Lee Mac Posted January 21, 2010 Posted January 21, 2010 Hi Emily, Hows this? (defun c:txtpt (/ Make_MText i ss ent) ; Lee Mac ~ 21.01.10 (defun Make_MText (pt str) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt) (cons 1 str)))) (if (setq i -1 ss (ssget '((0 . "POINT")))) (while (setq ent (ssname ss (setq i (1+ i)))) (Make_MText (cdr (assoc 10 (entget ent))) (apply (function strcat) (mapcar (function strcat) '("X = " "\nY = ") (mapcar (function rtos) (cdr (assoc 10 (entget ent))))))))) (princ)) Quote
Emily_83 Posted January 21, 2010 Posted January 21, 2010 Hi Emily, Hows this? (defun c:txtpt (/ Make_MText i ss ent) ; Lee Mac ~ 21.01.10 (defun Make_MText (pt str) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt) (cons 1 str)))) (if (setq i -1 ss (ssget '((0 . "POINT")))) (while (setq ent (ssname ss (setq i (1+ i)))) (Make_MText (cdr (assoc 10 (entget ent))) (apply (function strcat) (mapcar (function strcat) '("X = " "\nY = ") (mapcar (function rtos) (cdr (assoc 10 (entget ent))))))))) (princ)) absolutely perfect, thanx so much Lee Mac exactly what i was after:D:D Quote
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.