Jump to content

Inserting POINTS in drawing from all selecting (insert point) TEXT


Recommended Posts

Posted

Hi

Any command works in AutoCAD 2008 for inserting POINTS in drawing from all selecting (insert point) TEXT; I need these POINTS at object snap (Insertion) point only. Any LISP please for doing this job.Plz sees the sample drawing file.

amr

SAMPLE3.dwg

Posted

Try this:

 

(defun c:ptIns ( / GetTextInsertion Point i ss e )
 ;; Lee Mac  ~  28.04.10

 (defun GetTextInsertion ( elist )
   (if (and (eq "TEXT" (cdr (assoc 0 elist)))
            (not (equal '(0 0) (list (cdr (assoc 72 elist))
                                     (cdr (assoc 73 elist))))))
     (cdr (assoc 11 elist))
     (cdr (assoc 10 elist))))

 (defun Point ( p )
   (entmakex (list (cons 0 "POINT") (cons 10 p))))

 (if (setq i -1 ss (ssget '((0 . "TEXT,MTEXT"))))
   
   (while (setq e (ssname ss (setq i (1+ i))))

     (Point (GetTextInsertion (entget e)))))

 (princ))
     

Posted

Thanks Lee Mac

 

very usefull our project

 

Thanks

amr

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