Nardino Posted July 23, 2015 Share Posted July 23, 2015 (edited) Hello to all, does anybody know of a way to:......... Basically I have received a file from my client containing all the spot elevations of a surveyed area. These spot elevation (points) are nothing more than text where the insertion point is a northing, easting and an elevation. Unfortutely all of the Z values (elevations) are set to zero, which means I cannot create a contour drawing out of these points. So what I am asking is if there is a way to move all of these text contents to its equivalent z values. I have more than 15 thousand points and doing it one by one is not a task that could easily be done. Many thanks... Zvalues.dwg Edited July 23, 2015 by Nardino Quote Link to comment Share on other sites More sharing options...
steven-g Posted July 23, 2015 Share Posted July 23, 2015 Can you post the drawing, or even just a sample of some of the points as you have them now, I would imagine it is possible to get all the point text into excel and from there create a script to insert the text back along with a point at the correct elevation, but someone will need to see the text properties. Quote Link to comment Share on other sites More sharing options...
Nardino Posted July 23, 2015 Author Share Posted July 23, 2015 I have added a portion of the drawing. Quote Link to comment Share on other sites More sharing options...
steven-g Posted July 23, 2015 Share Posted July 23, 2015 Something like this, The details were taken out of Autocad by selecting all the text and using the "list" command, it helps to have "qaflags=2" and also having log files enabled in Autocad options, which creates a txt file that holds the complete command history for each drawing, which can be copied and pasted into excel. I couldn't include the whole spread sheet because the file size was too big, but it should give you the idea, I then filtered the sheet just to show the relevant rows and copied the cells with the "point" formulas Ctrl+c. Then goto the drawing and make sure you click into the command line so that it is active and press Ctrl+v, and just wait a minute for the script to run. It probably took about 20 minutes to do this for 2400 points, 15000 would only add a minute or two. points1.xlsx Zvalues1.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 24, 2015 Share Posted July 24, 2015 here is a lisp the only thing is it uses the insert point as the point location. This makes points with a Z value. This problem has been around a long time look at code date. ; converts text to a point with xyz ; z value equal to text ; by Alan H Nov 99 (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) (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)))) (princ txtht) (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 ) (setvar "osmode" oldsnap) (princ) Quote Link to comment Share on other sites More sharing options...
Nardino Posted July 24, 2015 Author Share Posted July 24, 2015 I'll give it a try shortly. Quote Link to comment Share on other sites More sharing options...
Tariq313 Posted July 28, 2015 Share Posted July 28, 2015 Are these texts are on correct position ? You can extract coordinates of text position in excel and draw them back into cad as points Quote Link to comment Share on other sites More sharing options...
ReMark Posted July 28, 2015 Share Posted July 28, 2015 Didn't the OP state the Z values are all at zero? Quote Link to comment Share on other sites More sharing options...
Nardino Posted July 28, 2015 Author Share Posted July 28, 2015 The x and y position are correct. It is the z value that is at 0, which is incorrect. Anyway thanks to steven-g and bigal the problem has been solved. 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.