Attribute Justifications En Masse

Attribute Justifications En Masse

Designer_1E
Enthusiast Enthusiast
247 Views
2 Replies
Message 1 of 3

Attribute Justifications En Masse

Designer_1E
Enthusiast
Enthusiast

Hello,

 

I downloaded an AutoLisp which can change the height of all my attributes, (pasted below), it works well.  Would anyone know how to edit this AutoLisp so that it can change the Justification of all my attributes?  I am constantly going into blocks supplied by our manufactures to change them to Bottom Center.

 

Thank you,

 

;;;Attribute height change
(defun c:ahc ()
(setq atth(getreal "\nEnter new attribute height: "))
(command "attedit" "y" "*" "*" "*" "c" pause pause)
(while
(= 1 (logand (getvar "cmdactive") 1))
(command "h" atth "n")
);;; end while
);;; end lisp

0 Likes
Accepted solutions (1)
248 Views
2 Replies
Replies (2)
Message 2 of 3

johnyDFFXO
Advocate
Advocate
Accepted solution

;; attribute alignment 13

 

(vl-load-com)

(defun c:AA13 ( / x y)
(if (setq x (ssget '((0 . "insert") (66 . 1))))
(repeat (setq y (sslength x))
(foreach z (vlax-invoke (vlax-ename->vla-object (ssname x (setq y (1- y)))) 'getattributes)
(vl-catch-all-apply 'vla-put-alignment (list z 13)))))
(princ)
)

 

Message 3 of 3

Designer_1E
Enthusiast
Enthusiast

This works. Thank you!

0 Likes