Message 1 of 30
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI
I need a little help
The aim is get the Attribute value from a existing block after insert a new one.
It should be easy, but i'm to dumb...
(defun c:<Test1 (/ pp ensel tag atr) ;; Lee Mac ;; http://www.lee-mac.com/attributefunctions.html (defun LM:getattributevalue ( blk tag / val enx ) (while (and (null val) (= "ATTRIB" (cdr (assoc 0 (setq enx (entget (setq blk (entnext blk))))))) ) (if (= (strcase tag) (strcase (cdr (assoc 2 enx)))) (setq val (cdr (assoc 1 enx))) ) ) ) (setq pp (getpoint "\nEinfügepunkt wählen: ") pp (subst (- (car pp) 170) (car pp) pp) pp (subst (+ (cadr pp) 277) (cadr pp) pp)) (setq ensel (car (nentselp pp))) (setq tag (cdr (assoc 2 (entget ensel)))) (setq atr (LM:getattributevalue ????? tag)) (princ atr) (prin1) )
Solved! Go to Solution.