guigol Posted June 29, 2012 Posted June 29, 2012 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?option=com_grosfichiers&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 Quote
ReMark Posted June 29, 2012 Posted June 29, 2012 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. Quote
marko_ribar Posted June 29, 2012 Posted June 29, 2012 (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) ) M.R. Quote
ReMark Posted June 29, 2012 Posted June 29, 2012 I guess I can stop looking. That's pretty quick service there marko. guigol you should tell your friends to visit CADTutor. 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.