YoyoGraphics Posted July 9, 2009 Share Posted July 9, 2009 Greetings, I have a 2D site plan with hundreds of elevation numbers (text elements) scattered all around it. What I want to do is run a script that will read what those bits of text say (like "1173.08", etc.) and paste that value into the Z position of the text element, so that the number actually is what it says it is. Is there an AutoLisp routine that can do this? Thanks! -Geoff Quote Link to comment Share on other sites More sharing options...
JoeC Posted July 10, 2009 Share Posted July 10, 2009 I don't know about a LISP, but I often recommend the EATTEXT command. It will capture the text and its coordinates exportable to excel. Does this help? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 14, 2009 Share Posted July 14, 2009 Search here its under co-ord pts couple of different lisp routines to do exactly what you want Anway here is one soloution ; converts text to a point with xyz ; z value equal to text ; by Alan H Nov 99 (while (not (setq ss (ssget)))) (command "layer" "new" "txthts" "") (setvar "clayer" "txthts") (setvar "pdsize" 3) (setvar "pdmode" 35) (while (setq en (ssname ss 0)) ; Entity type (setq entyp (cdr (assoc 0 (entget en)))) (if (= entyp "TEXT") (progn (setq xyz (cdr (assoc 10 (entget en)))) (setq txtht (cdr (assoc 1 (entget en)))) (setq txtz (atof txtht)) (setq ptxyz (list (car xyz)(cadr xyz) txtz)) (command "point" ptxyz) ) ) ; Delete each measured entity from set (ssdel en ss) ;end while ) 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.