PDA

View Full Version : Lisp for Handle


tguy
2008-07-11, 12:14 AM
How can i write a lisp to extract the handle of an object and then paste it in the dwg?

miff
2008-07-11, 01:05 AM
real quick basics...

(setq ent (car (entsel "\nSelect entity: ")))
(setq handl (cdr (assoc 5 (entget ent))))
(command ".text" pause 0 handl "")

may need to play with the text command inputs if you are using a style with/without a set height.

rkmcswain
2008-07-11, 04:08 AM
It might be worth mentioning that you can also use a field to do this.
Not with the UI, but with lisp you can do it. You just need to extract the ObjectID and plug it in this Field string.



%<\AcObjProp Object(%<\_ObjId 2129671512>%).Handle>%