The Courage Dog Posted June 30, 2008 Share 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 Link to comment Share on other sites More sharing options...
eldon Posted June 30, 2008 Share 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 Link to comment Share on other sites More sharing options...
The Courage Dog Posted July 1, 2008 Author Share Posted July 1, 2008 thank you for your reply.....it really help me a lot. Quote Link to comment Share on other sites More sharing options...
gerbaux Posted July 3, 2008 Share 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 Link to comment Share on other sites More sharing options...
gerbaux Posted July 3, 2008 Share Posted July 3, 2008 sorry i'm still new to LISP.. so i can't post my own codes... Quote Link to comment Share on other sites More sharing options...
ASMI Posted July 3, 2008 Share Posted July 3, 2008 Two more: http://www.asmitools.com/Files/Lisps/Ordi.html http://www.asmitools.com/Files/Lisps/Ordy.html Quote Link to comment Share on other sites More sharing options...
The Courage Dog Posted July 7, 2008 Author Share Posted July 7, 2008 ASMI, this is exactly what i'm looking for... thanks a lot. Quote Link to comment Share on other sites More sharing options...
BELIKX Posted June 6, 2009 Share Posted June 6, 2009 nice one..it really helps....big thanks ASMI Quote Link to comment Share on other sites More sharing options...
asos2000 Posted July 14, 2009 Share Posted July 14, 2009 ASMI Refer to ordy.lsp could be the coordenate ID and X,Y in a table Quote Link to comment Share on other sites More sharing options...
Phiphi Posted December 18, 2009 Share 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 Link to comment Share on other sites More sharing options...
Emily_83 Posted January 21, 2010 Share 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 Link to comment Share on other sites More sharing options...
Lee Mac Posted January 21, 2010 Share 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 Link to comment Share on other sites More sharing options...
Emily_83 Posted January 21, 2010 Share 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 Link to comment Share on other sites More sharing options...
Lee Mac Posted January 21, 2010 Share Posted January 21, 2010 You're welcome Quote Link to comment Share on other sites More sharing options...
wannabe Posted January 23, 2010 Share Posted January 23, 2010 Tools --> Data Extraction 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.