cadamrao Posted April 28, 2010 Posted April 28, 2010 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 Quote
Lee Mac Posted April 28, 2010 Posted April 28, 2010 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)) Quote
cadamrao Posted April 29, 2010 Author Posted April 29, 2010 Thanks Lee Mac very usefull our project Thanks amr 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.