Attribute Object ID in Block.
Hi guys its me again, I am trying to create a tagging system linking the attribute to a text field, I have this routine from @Tharwat that creates a text+field after clicking on the target block w/ attribute (it does work with default ent. properties like Block Unit, Color, Layer, Name etc.) but my problem is the attribute def. it has a different ObjectId and since the routine that Tharwat create uses (car (entsel) it will only return the block ObjectId and not the Attribute ObjID inside.
Attribute ObjId 8796087888544
Others ObjId 8796087888528
Any Idea, is this feasible?
Tharwats routine
(vl-load-com)
(defun c:TAG (/ space ss pt)
(setq space (vla-get-modelspace
(vla-get-ActiveDocument (vlax-get-acad-object))
)
)
(if (and (setq ss (car (entsel "\n Select a BLOCK : ")))
(setq pt (getpoint "\n Specify TAG Location :"))
)
(vla-addMText
space
(vlax-3d-point pt)
4.
(strcat "%<\\AcObjProp Object(%<\\_ObjId "
(itoa (vla-get-ObjectID (vlax-ename->vla-object ss)))
">%).TextString \\f \"%tc1\">%"
)
)
(princ)
)
(princ)
)
: