Hi Don,
Replace these lines:(setq attributes (vla-getattributes block_reference) attributes (vlax-variant-value attributes) attributes
(vlax-safearray->list attributes)
)
(setq square_feet_attribute (cadr attributes))
(setq square_feet (strcat (rtos (/ (vla-get-area pline)144) 2 3 ) " Sq. Ft. "))
(vla-put-textstring square_feet_attribute square_feet)
with these:(setq attributes (vlax-invoke block_reference 'getattributes));;not necessary to change this, but it's easier to read, IMHO
(foreach att attributes
(if (eq (vla-get-tagstring att) "SQFT");;<<<---change to value your attribute uses
(progn
(setq square_feet (strcat (rtos (/ (vla-get-area pline)144) 2 3 ) " Sq. Ft. "))
(vla-put-textstring att square_feet)
)
)
)
That should do it.