labelling Easting & Northing c
hi,i have received a drawing showing coordinates of various points for example
(E 3456.98, N 4276.87) etc.
how can i find the coordinates of other points in the same drawing.
---- i used EN.lisp but it gives wrong coordinates.
plz help This is somewhat rudimentary, but could work. Give it a go and let me know if this is what you were looking for. (You can change the text settings if necessary)
(defun c:test ( / point p1 coord xval yval str) (while (if (and (setq point (car (entsel "\nSelect a point to label : ")) p1 (entget point) ) (= (cdr (assoc 0 p1)) "POINT") ) (progn (setq p1 (entget point) coord (cdr (assoc 10 p1)) xval (car coord) xval (rtos xval 2 2) yval (cadr coord) yval (rtos yval 2 2) ) (setq str (strcat "(E " xval ", " "N " yval ")")) (command "_.text" "Justify" "bl" coord "2.0" "" str ) ) (princ "\nDid not select a point : ") ) ) (princ)) thnx but how to use it plzzzzzzzzzzz.... CheSyn
The back slash should be forward slash .
(defun c:test (\ point p1 coord xval yval str)
And it is a good practice to check if the selected object is matching your desired object name "POINT" to avoid error message
and crashing the routine .
e.g .
(and (setq point (car (entsel "\nSelect a point to label : "))) (eq (cdr (assoc 0 (entget point))) "POINT") ) im thankful for ur support,......
i did both, forward & backward slash,... but it doesnt give correct coordinates,
plz give ur expertise,.. Have you tried to ID the place where a coordinate has been written to see whether it gives the same coordinate as the figures?
Someone might have written coordinates into the drawing and then moved the whole drawing.
I am not familiar with EN.lspperhaps you could post the routine. Load it, and call the command with "test" (you can change this to whatever you want). Select a point, and text will show in its place. The command will loop until a point is selected (if you select another entity type).
Very good, thank you! Please see the updated code above.
Kallerman,
I have updated the above code - and verified it works in my drawings.
Please try it. If it does not work for you, post a copy of the drawing you are working with. I'm sure someone will be able to help you, as I am leaving on vacation for 10 days. i tried few routines and the ones u posted, it gives the same answer with all,.. here is attached the bottom left of my drawing area,..
if i set (4400, 3000) as origin the see the results in the screen shot,.. see the variation in results,....
页:
[1]
2