Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found this lisp a while back and can't find the original thread. Dynamic Block has an attribute TAG called NOTE01 and block Table Table information. Lisp works fine, it reads NOTE01 attribute and Table Text. Command places block information on a leader.
I want to add another block with a different attribute TAG (NOTE02) but when i add the attribute to the lisp nothing works.. I don't want to create different lisps/command for the same category of blocks.
See lisp. object in red is the new attribute TAG and that's when nothing work.
(defun c:Note ( / obj ent items counter blkname attname attdxf) (setq ent (SSget)) (setq p1 (getpoint "\nSpecify arrowhead location: ")) (setq p2 (getpoint p1 "\nSpecify leader landing location: ")) (if ent (progn (setq Items (sslength Ent ) ) (setq Counter -1 ) (repeat Items (setq Counter (1+ Counter ) ) (setq BlkName (ssname Ent Counter ) ) (setq AttName (entnext BlkName ) ) (eq "AcDbAttribute" (setq obj (vlax-ename->vla-object attname))) (while AttName (setq AttDxf (entget AttName ) ) (if (= (cdr (assoc 2 AttDxf )) "NOTE01, NOTE02") (command "mleader" P1 p2 (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid obj)) ">%).TextString>%") ) ) (if (= (cdr (assoc 0 (entget AttName ))) "SEQEND" ) (setq AttName nil ) (setq AttName (entnext AttName )) ) ) (setq AttName BlkName ) ) ) ) (princ) )
Solved! Go to Solution.