hello guys .
I write this lisp to change justifications of attribute string "aa" to Top Center , but the string goes to zero coordinates , anyone can help please ?
(defun c:test (/ ss vla-obj ss-name atts-obj n)
(vl-load-com)
(setq n 0)
(setq ss (ssget '((0 . "INSERT") (66 . 1))))
(while (setq ss-name (ssname ss n))
(setq vla-obj (vlax-ename->vla-object ss-name))
(setq atts-obj (vlax-invoke vla-obj 'getattributes))
(foreach att atts-obj
(if (eq (vla-get-textstring att) "1")
(vla-put-alignment att acAlignmentTopCenter)
)
)
(setq n (1+ n))
)
(princ)
)