(defun c:CTR(/ *error* )
(vl-load-com);Load Activex Support
(defun *error* (s)
(if adoc (vla-endundomark adoc))
(if (not (member s '("Function cancelled" "quit / exit abort")))
(princ (strcat "\n---->Error:" s))
)
(princ)
)
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark adoc)
(if
(and
(setq sset (ssget '((0 . "TEXT,MTEXT"))))
(setq value (getreal "\nEnter New Rotation Value in Degrees:"))
)
(progn
(if (< value 0)
(*error* "Negative Values Not Allowed")
(progn
(repeat (setq i (sslength sset))
(setq en (vlax-ename->vla-object (ssname sset (setq i (1- i)))))
(if (vlax-write-enabled-p en)
(vlax-put-property en 'Rotation (DTR value))
)
)
)
)
)
)
(vla-endundomark adoc)
(princ))
;;Sub function for Convert Degree to Radians;;
(defun DTR (a)
(* pi (/ a 180.0))
)
Monday, 18 February 2013
Posted by Unknown on 00:09 with No comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment