Code Red > AutoLISP (Vanilla / Visual)
How to select in attipedit with lisp
Crank:
I'm trying to walk trough all attribs after a block has been inserted with lisp and then start the command ATTIPEDIT on every attribute. This is something I've tried:
--- Code: ---(setq att (entlast))
(if (assoc 66 (entget att))(progn
(setq att (entnext (entlast)))
(while (setq att (entnext att))
(if (= (cdr (assoc 0 (entget att))) "ATTRIB")
(vl-cmdf ".attipedit" (nentselp (cdr (assoc 11 (entget att)))))
)
)
))
--- End code ---
The problem with this is that you need a point real close to the text. The coords of DXF-code 10 or 11 are not working because the text isn't on those insertion points.
So the big question is: How can I find a point that's exact on the text of the attribute, or is there another way to use ATTIPEDIT when you only have the ename of the block to go from?
LE:
ATTIPEDIT ?
is that a new command in A2008?
Crank:
Yes, it's a command to edit an atrribute in place.
T.Willey:
I don't have '08, so this is a guess/idea. Couldn't you just pass the ename of the attribute to the comamnd?
Edit: You may need to watch out for the error of nesting a command to deep.
Crank:
Negative. This doesn't work: (command "attipedit" (entnext (entlast))) , but this works: (command "attipedit" (nentsel)) or (command "attipedit" (nentselp))
The coords found with (nentselp) can also be used.
Navigation
[0] Message Index
[#] Next page
Go to full version