I'm pretty sure I've seen this question before, maybe asked in a slightly different manner, but I think one of the lisp gurus here came up with a solution via a custom routine. I'll have to search around and see if I can find the thread.

Registered forum members do not see this ad.
hi,
First of all, sorry for my poor english.
I've joined a dwg files for a better comprehension of my "problem".
http://www.grosfichiers.ch/index.php...osfichiers&cid[]=n0pp6olmgclaoei1cn2uko9dl4&task=resultat
on this file you will see lot of objects (points in fact).
I would like to replace them by text. just the number "1"
I don"t want to give attributes, or modify the points.
I just want to delete each point and replace it by a 1.
I don't think there is a function to do it.
I tried to write a lisp routine but i didn't succeed.
Is there someone here who have allready develop a such routine?
Thank in advance for your help
I'm pretty sure I've seen this question before, maybe asked in a slightly different manner, but I think one of the lisp gurus here came up with a solution via a custom routine. I'll have to search around and see if I can find the thread.
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
M.R.Code:(vl-load-com) (defun c:p2t ( / msp ss txtsize n entpt pt txt ) (setq msp (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (while (not ss) (prompt "\nSelect points to replace with text \"1\"") (setq ss (ssget ":L" '((0 . "POINT")))) ) (initget 7) (setq txtsize (getreal "\nInput text height : ")) (repeat (setq n (sslength ss)) (setq entpt (ssname ss (setq n (1- n)))) (setq pt (cdr (assoc 10 (entget entpt)))) (setq txt (vla-addtext msp "1" (vlax-3d-point pt) txtsize)) (vla-put-alignment txt 10) (vla-put-textalignmentpoint txt (vlax-3d-point pt)) (entdel entpt) ) (princ) )

Thanks a lot. It works perfectly
Registered forum members do not see this ad.
I guess I can stop looking. That's pretty quick service there marko. guigol you should tell your friends to visit CADTutor.
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
Bookmarks