任意调整光标角度,很好用!!!!(defun c:gbjd() (setq en (entsel "\n选取线,文字或图块<[Enter]输入角度>:")) (if (/= en nil) (progn (setq endata (entget (car en))) (setq entyp (cdr (assoc 0 endata))) (cond ((= entyp "LINE") (line-ang))
(defun c:gbjd()
(setq en (entsel "\n选取线,文字或图块<[Enter]输入角度>:"))
(if (/= en nil)
(progn
(setq endata (entget (car en)))
(setq entyp (cdr (assoc 0 endata)))
(cond ((= entyp "LINE") (line-ang))
((= entyp "TEXT") (text-ang))
((= entyp "MTEXT") (text-ang))
((= entyp "INSERT") (text-ang))
(t (2p-ang))
)
)
(2p-ang)
)
(setvar "snapang" ang)
)
(defun line-ang()
(setq pt10 (cdr (assoc 10 endata)))
(setq pt11 (cdr (assoc 11 endata)))
(setq ang (angle pt10 pt11))
)
(defun text-ang()
(setq ang (cdr (assoc 50 endata)))
)
(defun 2p-ang()
(setq ang (getangle "\n输入角度值:"))
)
(princ "\n-------------c:gbjd-----------")
(prin1)