radualex37 Posted September 19, 2011 Posted September 19, 2011 Dose anyone hava a lisp that imports points in this form: PNEZD and every code/description is put on a different layer (purpose: to be able tu change the color according to the code) Quote
Tharwat Posted September 19, 2011 Posted September 19, 2011 Welcome to the forum . With more extra description about your needs would be much better for all to give the perfect routine that you looking for . Tharwat Quote
radualex37 Posted September 19, 2011 Author Posted September 19, 2011 Thank you! I am happy to be here! I am a surveyor and I collect data with a total station. I atribue a code to very point observed. I get back home and want to join the points. I would be much easier if every code would be of different color Quote
Tharwat Posted September 19, 2011 Posted September 19, 2011 I am still feel hard to get what you mean and what you want from the code to do . Quote
radualex37 Posted September 19, 2011 Author Posted September 19, 2011 Example: P X Y D 1 440770.194 549643.709 cc 2 440774.968 549633.793 cc 3 440784.367 549643.339 x 4 440790.14 549641.785 x 5 440784.367 549629.317 d I thant to import the points above. Is it possible to import them so that for every describsion (ex: cc, x, d) to create a layer ( CC, X, D ) on which the points( 1, 2...) should stand in order for me to modify the color. (ex: point 1 and 2 - on layer CC, 3 and 4 - on layer x, 5 - on layer d). Hope it cleared it, if not i will try again Quote
alanjt Posted September 19, 2011 Posted September 19, 2011 Map doesn't have a way to import points? Quote
radualex37 Posted September 19, 2011 Author Posted September 19, 2011 (edited) I import my points with something called TopoLT. It is the best for what I do. I can send a demmo at radualex37(a)yahoo.com. It would realy be a dream if the description would have different color. Edited September 19, 2011 by radualex37 Quote
BIGAL Posted September 20, 2011 Posted September 20, 2011 CIV3d is what you want. A commercial product "STRINGER" search via google Theres lots of import xyz lisp around you could change the code to recognise the point descriptor, your next question would be can I now have it join together with lines all the common points. What instrument do you have most have the ablity to string a job these days or the instrument supplier will have a program for sure. Alos were are you in the world. As an ex Topcon dealer a lot of their instruments produce a dxf file within the data recorder or total station just not widely known. Quote
pBe Posted September 20, 2011 Posted September 20, 2011 (edited) Granting your point file is in this format: 1 440770.194 549643.709 cc 2 440774.968 549633.793 cc 3 440784.367 549643.339 x 4 440790.14 549641.785 x 5 440784.367 549629.317 d you can use something like this (defun c:test (/ fl pf lne ptlst) (setq fl (getfiled "Select Point File" "" "txt" ) (setq pf (open (findfile fl) "r")) (while (setq lne (read-line pf)) (setq ptlst (cons (read (strcat "(" lne ")")) ptlst)) ) (close pf) (reverse ptlst) ) You can very well do what you want with the resulting list. there will be four (4) items for each list (1 440770.194 549643.709 cc) 1 440770.194 549643.709 cc Edited September 20, 2011 by pBe Code cleanup Quote
VVA Posted September 20, 2011 Posted September 20, 2011 Import coordinates from a text file txt (sdr csv) into AutoCAD. Original (Russian) Google translate known author on this site under the name Geobilder. You can ask him to translate the interface Quote
radualex37 Posted September 20, 2011 Author Posted September 20, 2011 I'm sorry but i don't have the nolege to do programing. I guess I'l keep it in mind until I read some books about it. Thank you for all your replys. Quote
radualex37 Posted September 20, 2011 Author Posted September 20, 2011 Thank you for the idea. I will gie it a try Quote
CAD89 Posted September 20, 2011 Posted September 20, 2011 Can you send me the measurements info? the whole table of coordinates? (inventarul de coordonate cu tot cu coduri) or the dwg file with the points so I can see if I can do something with it? Quote
radualex37 Posted September 20, 2011 Author Posted September 20, 2011 1 586854.710 393648.155 331.680 pom 2 586873.282 393644.289 331.794 pom 3 586857.839 393652.687 331.528 d 4 586872.768 393644.648 331.607 d 5 586853.165 393655.549 331.740 l 6 586856.005 393654.101 331.689 can 7 586859.952 393658.946 331.575 pom 8 586881.205 393660.062 331.712 pom 9 586861.705 393660.394 331.518 d 10 586881.269 393661.062 331.543 d 11 586857.076 393663.318 331.737 cc 12 586884.052 393665.358 331.715 s 13 586861.869 393662.437 331.624 s 14 586862.469 393661.957 331.528 b 15 586884.992 393667.489 331.686 po 16 586862.643 393662.921 331.517 b 17 586862.698 393664.319 331.502 b 18 586862.412 393666.086 331.516 b 19 586862.113 393667.451 331.548 b 20 586861.195 393668.850 331.571 b 21 586860.224 393670.112 331.574 b 22 586855.889 393672.728 331.631 b 23 586855.062 393672.691 331.643 b 24 586854.416 393672.467 331.645 b 25 586854.125 393672.127 331.671 b 26 586852.339 393669.337 331.796 b 27 586847.472 393672.501 331.911 b 28 586849.434 393676.126 331.866 b 29 586849.543 393676.497 331.965 b 30 586848.582 393677.065 331.878 b 31 586848.402 393676.970 331.816 b 32 586842.145 393673.393 331.953 b 33 586840.766 393675.562 331.925 b 34 586839.555 393674.875 331.892 b 35 586838.241 393677.182 330.703 b 36 586837.097 393676.339 330.742 b 37 586835.917 393678.611 331.824 b 38 586834.645 393678.024 331.820 b 39 586833.457 393680.314 332.040 b 40 586836.309 393681.819 331.992 b 41 586836.653 393682.239 331.970 b 42 586836.746 393682.946 331.960 b 43 586836.491 393683.459 331.990 b 44 586829.675 393688.116 332.114 b 45 586828.557 393689.206 333.564 sp 46 586827.854 393688.125 333.689 cc 47 586828.049 393687.254 332.778 l 48 586834.517 393683.250 332.547 cc 49 586832.073 393678.759 332.568 cc 50 586838.982 393674.356 332.258 cc 51 586839.789 393673.884 332.056 cc 52 586844.852 393670.774 331.921 cc 53 586848.321 393675.923 331.862 s 54 586847.843 393675.497 331.988 asp 55 586848.338 393675.109 331.913 asp 56 586847.518 393674.867 332.236 asp 57 586848.006 393674.583 331.917 asp 58 586845.384 393671.936 331.891 b 59 586852.727 393667.219 331.820 b 60 586846.514 393674.088 331.850 b 61 586854.395 393669.863 331.782 b 62 586847.563 393671.842 331.852 apa 63 586848.183 393671.425 331.848 apa 64 586847.314 393671.346 332.218 apa 65 586847.933 393671.026 331.857 apa 66 586849.375 393670.850 331.795 comp 67 586849.959 393670.442 331.795 comp 68 586849.716 393670.044 331.797 comp 69 586849.087 393670.395 332.156 comp 70 586849.562 393669.767 331.836 comp 71 586848.760 393670.282 331.819 comp 72 586854.244 393671.482 331.727 comp 73 586854.708 393671.168 331.749 comp 74 586853.865 393670.857 332.104 comp 75 586854.343 393670.593 331.764 comp 76 586855.614 393669.555 331.579 h 77 586856.396 393669.638 331.667 r 78 586857.904 393670.497 331.722 r 79 586856.575 393666.461 331.806 elect 80 586857.392 393666.239 331.827 elect 81 586856.989 393665.342 331.862 elect 82 586856.218 393665.690 331.824 elect 83 586830.103 393691.790 332.106 is 84 586832.256 393695.323 333.270 is 85 586833.345 393695.673 332.331 i 86 586834.326 393699.053 333.283 i 87 586833.732 393696.236 332.328 i 88 586834.632 393697.834 333.102 i 89 586838.319 393705.187 332.302 cc 90 586830.398 393691.733 332.202 b 91 586831.586 393691.812 332.139 b 92 586832.086 393692.331 332.131 b 93 586833.340 393694.130 332.139 b 94 586833.321 393695.642 332.362 b 95 586835.799 393698.492 332.175 b 96 586836.514 393699.540 332.184 b 97 586834.645 393697.882 333.067 b 98 586839.487 393704.422 332.159 b 99 586839.567 393705.443 332.711 b 100 586843.582 393696.005 332.011 pompa 101 586844.238 393696.235 332.028 pompa 102 586843.765 393695.188 332.612 pompa 103 586847.219 393693.057 332.541 pompa 104 586847.904 393693.272 332.522 pompa 105 586847.710 393694.161 331.963 pompa 106 586847.260 393693.400 332.642 pompa Quote
Tyke Posted September 20, 2011 Posted September 20, 2011 ... imports points in this form: PNEZD ... Example: P X Y D 1 440770.194 549643.709 cc You originally said a format with a height (Z) value, then it was omitted in post #5. If you are collecting data using a total station, what happened to your Z values? Normally data from a total station has a Z value, if you use it that is a different matter, but I wouldn't simply discard it from my raw data. Edit: Then in post#14 your data has a Z value. Do you also need to insert blocks and automatically join lines? Do you have a fixed code list that you use for every survey and do you have your CAD standards already set up; layer name, colour, linetype, line thickness, etc? Get those sorted out first and then tailor your LISP / VBA to suit. Quote
pBe Posted September 20, 2011 Posted September 20, 2011 (edited) 1 is the color? 586854.710 393648.155 331.680 the XYZ coordinates? pom Layer? Create a POLYLINE, Color red, on prom layer? wherein color is NOT bylayer? Anyhoo.. tried this with your points and it gave me a strange looking 3dpolyline vertices (defun c:test (/ fl pf lne ptlst a b) (setq fl (getfiled "Select Point File" "" "txt" ) (setq pf (open (findfile fl) "r")) (while (setq lne (read-line pf)) (setq ptlst (cons (read (strcat "(" lne ")")) ptlst)) ) (close pf) (setq ptlst (reverse ptlst)) (while (and (setq a (car ptlst)) (setq b (cadr ptlst)) ) (command "_.3dpoly" "_non" (list (cadr a) (caddr a) (cadddr a) ) "_non" (list (cadr b) (caddr b) (cadddr b) ) "" ) (setq ent (entget (entlast))) (entmod (subst (cons 8 (vl-symbol-name (last a))) (assoc 8 ent) ent) ) (entmod (subst (cons 62 (car a)) (assoc 8 ent) ent)) (setq ptlst (cdr ptlst)) ) ) Now I'm almost certain i misunderstood your request Edited September 20, 2011 by pBe Add test code Quote
radualex37 Posted September 20, 2011 Author Posted September 20, 2011 no 1,2,3 ... are the points IDs. It's ideal to have Z, but, optional. I just want for every code ( the description of the point ) to have a different color so that i can join them with a polyline more easely (manualy). The best way is probably by puting different point descriptions on different layers. In the folowing picture, i.ve observed some points. The 4 red points represent a building (for ex) and I know that I should draw the pl throu them and them alone, because they are red ( they have the same description). Sorry for my english, i'l get better I promise here is the print screen http://dl.transfer.ro/transfer_ro-20sep-f35f9fc01ef122.zip Quote
radualex37 Posted September 20, 2011 Author Posted September 20, 2011 points with description S are placed on layer S points with description x are placed on layer x ............................................................... i don't even need the point ID, a circle would be sufficent Quote
alanjt Posted September 20, 2011 Posted September 20, 2011 Not tested... (defun c:Importer (/ file fopen line) (vl-load-com) (if (setq file (getfiled " Select a coordinate file to import:" (getvar 'DWGPREFIX) "TXT" 2)) (progn (setq fopen (open file "R")) (while (setq line (read-line fopen)) (setq line (read (strcat "(" line ")"))) (entmakex (list '(0 . "POINT") (cons 8 (vl-princ-to-string (last line))) (cons 10 (reverse (cdr (reverse (cdr line))))) ) ) ) (close fopen) ) ) (princ) ) Quote
BIGAL Posted September 21, 2011 Posted September 21, 2011 The answer to do this properly is to look at the descriptor it either has a look up table that says its a point or it has within the code a control that identifies it as a string or a point. eg 00pom v's 01pom the 00 is a point no matter howmany but the 01pom says join string 1 poms together string 02pom is not joined to 01pom! This is basic surveying technique used by all surveyors using total stations. For those wanting to write a string program I would start by sorting all points on the point number first then secondly on the descriptor this way they are grouped and recorded in the order surveyed. Then a simple read line program would work. Next step is if a point what block to attach. For those that know 01F*03F this is a point which is a building line intersection with fence 03 your plan would draw a T connecting all line work Fence 01 & 03 It does not matter in your descriptors wether there numbers, alpha or combination. 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.