Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

(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.

Posted

I guess I can stop looking. That's pretty quick service there marko. guigol you should tell your friends to visit CADTutor.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...