I was using this in 2011 to match label rotation of an existing point but it no longer works in 2013? does anyone know the value I need to grab and set or will this format not work in 2013,
(defun c:mro (/ doc ss ss2 obj obj2 newrot oldrot)
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object))) (vla-startundomark doc)
(princ "\nSelect point to match the rotation of to: ")
(setq ss2 (ssget ":S" '((0 . "AECC_COGO_POINT"))))
(setq obj2 (vlax-ename->vla-object (ssname ss2 0)))
(setq newrot (vlax-get obj2 'Label_Rotation))
(princ "\n....select Points to change: ")
(if (setq ss (ssget '((0 . "AECC_COGO_POINT"))))
(while (> (sslength ss) 0) (setq obj (vlax-ename->vla-object (ssname ss 0))) (vl-catch-all-apply '(lambda () (vlax-put obj 'Label_Rotation newrot)
)
)
;;this will catch the error that occurs if the user selects a point with <default> or <none> as the style
(ssdel (ssname ss 0) ss)
)
)
(vla-endundomark doc)
(princ)
)
Use the Code button when composing messages to prevent the smiley's from becoming smileys.
(defun c:mro (/ doc ss ss2 obj obj2 newrot oldrot) (vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vla-startundomark doc) (princ "\nSelect point to match the rotation of to: ") (setq ss2 (ssget ":S" '((0 . "AECC_COGO_POINT")))) (setq obj2 (vlax-ename->vla-object (ssname ss2 0))) (setq newrot (vlax-get obj2 'LabelRotation)) (princ "\n....select Points to change: ") (if (setq ss (ssget '((0 . "AECC_COGO_POINT")))) (while (> (sslength ss) 0) (setq obj (vlax-ename->vla-object (ssname ss 0))) (vl-catch-all-apply '(lambda () (vlax-put obj 'LabelRotation newrot) ) ) ;;this will catch the error that occurs if the user selects a point with <default> or <none> as the style (ssdel (ssname ss 0) ss) ) ) (vla-endundomark doc) (princ) )