BIGAL Posted June 6, 2018 Posted June 6, 2018 Least they have moved the text not the block 40 years Civil experience, if they moved the point or block then that is a serious problem with the accuracy of the data you would know all about it on my team. I will redo the ssget "CP" option as soon as I find some time. Ronjonp nice code not sure which would be faster using a "WP" or comparing the distance between all the text. On the sample dwg probably no difference may creep in when dealing with real big numbers of points. Quote
Least Posted June 6, 2018 Posted June 6, 2018 Just the text, the block (cross) is correct. Personally I use an attributed block, so that the text can be moved with no issues. Quote
hanhphuc Posted June 6, 2018 Posted June 6, 2018 Just the text, the block (cross) is correct. Personally I use an attributed block, so that the text can be moved with no issues. agree. But why the drawing cross (block) & text apart? it will be a mess if not paired nicely. like BIGAL mentioned "comparing the distance between all the text" if we have 100 cross how to pair with 79 texts if out of 20 texts accidenly get deleted ? our projects also using attributed block. with ID,ELEV,CODE tags Quote
Least Posted June 6, 2018 Posted June 6, 2018 Hi Hanhphuc, Unfortunately I can't control how other people carry out their surveys. Lots of survey software seem to compile this way, I don't particularly like it. Anyway, I spent a couple of hours last night, isolating the points/blocks and text levels, making sure every level text had a corresponding cross, added crosses where needed (there were manhole covers with no crosses for instance). I ran RonjonPs excellent code, then went through all the points to check they had been assigned the correct text level. After 2-3 hours I managed to get all 2,500 points done, so all in all not too bad. Now I have all the points at their correct Z value I could replace them with attributed blocks, but for now this will do nicely. I guess I'm lucky that RonjonP and Bigal etc exist and are willing to assist! Cheers Quote
BIGAL Posted June 7, 2018 Posted June 7, 2018 Is not the manhole cover not a block ? In my code the ssget uses the (0 . "INSERT") If you remove the layer "058" it will find all blocks and look for text. Quote
hanhphuc Posted June 7, 2018 Posted June 7, 2018 Hi Hanhphuc, Unfortunately I can't control how other people carry out their surveys. Lots of survey software seem to compile this way, I don't particularly like it.Anyway, I spent a couple of hours last night, isolating the points/blocks and text levels, making sure every level text had a corresponding cross, added crosses where needed (there were manhole covers with no crosses for instance). I ran RonjonPs excellent code, then went through all the points to check they had been assigned the correct text level. After 2-3 hours I managed to get all 2,500 points done, so all in all not too bad. Now I have all the points at their correct Z value I could replace them with attributed blocks, but for now this will do nicely. I guess I'm lucky that RonjonP and Bigal etc exist and are willing to assist! Cheers oh same surveyor problems. shape of column, rectangular takes 2 point orientation, but sometimes 3 corners. rounded sometimes 1 point, sometimes 3 points another issue BIGAL knows well no worries you got it sorted. luckily ronjonp Quote
Least Posted June 7, 2018 Posted June 7, 2018 Thanks for the tip. Some are and some aren't. Some are 3 pt rectangle polylines, so I added points to those. Thanks P Quote
toni Posted 5 hours ago Posted 5 hours ago On 05/06/2018 at 14:13, ronjonp said: Here's another: (defun c:foo (/ _ss2l c p p2 s1 s2) (defun _ss2l (s) (cond ((= 'pickset (type s)) (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))))) (cond ((and (setq s1 (_ss2l (ssget "_A" '((0 . "text"))))) (setq s2 (_ss2l (ssget "_A" '((0 . "insert,point"))))) (setq s2 (mapcar '(lambda (x) (cons (cdr (assoc 10 (entget x))) x)) s2)) ) (foreach a s1 (setq p (cdr (assoc 10 (entget a)))) (setq c (car (vl-sort s2 '(lambda (r j) (< (distance p (car r)) (distance p (car j))))))) (setq p2 (list (caar c) (cadar c) (atof (cdr (assoc 1 (entget a)))))) (entmod (append (entget (cdr c)) (list (cons 10 p2)))) (entmakex (list '(0 . "line") '(62 . (cons 10 p) (cons 11 p2))) ) ) ) (princ) ) I tried installing this, but I get the following text in the command prompt - "error: extra cdrs in dotted pair on input". Does anyone know how to fix the error? Quote
ronjonp Posted 14 minutes ago Posted 14 minutes ago 4 hours ago, toni said: I tried installing this, but I get the following text in the command prompt - "error: extra cdrs in dotted pair on input". Does anyone know how to fix the error? Ooops .. code updated at that post. Here's the problem ( missing parenthesis and color number) 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.