That field code is a formula with nested fields. You could generate a formula like this:
Code:
%<\AcExpr (%<\AcObjProp Object(%<\_ObjId 2130532480>%).TextString>%+%<\AcObjProp Object(%<\_ObjId 2130532480>%).TextString>%)>%
Where the number following the ObjId is the COM ObjectId property of the attribute. You can obtain this using lisp:
Code:
(setq en (nentsel "Pick attribute:")) ;Select the attribute
(setq eo (vlax-ename->vla-object (car en))) ;Get the COM Object
(princ "The object's Id is: ")
(princ (vla-get-ObjectId eo))
(princ)