iCAx开思网
标题:
十字光标角度调整
[打印本页]
作者:
chenjian1
时间:
2006-1-20 22:55
标题:
十字光标角度调整
;;;********************************************************************1
;十字光标角度调整 Command:AC
;;;Version 1.0
(defun c:AC (/ en ang entyp pt10 pt11)
(setq en (entsel "\n选取线、文字或图块 <0>: "))
(if en
(progn
(setq endata (entget (car en)))
(setq entyp (cdr (assoc 0 endata)))
(cond ((= entyp "LINE") (line-ang))
((= entyp "TEXT") (text-ang))
((= entyp "INSERT") (text-ang))
(t (2p-ang))
)
)
(setq ang 0)
)
(setvar "snapang" ang)
(princ
"\n---Bye c:Ac 光标角度调整!---"
)
(prin1)
)
(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输入角度值: "))
)
作者:
jionpla
时间:
2006-5-2 13:57
兄弟,我感觉你是简单问题复杂化,
直接在ACAD.PGP中加入 "AC, *snapang"
不过,我不会编程,还是很欣赏你的编程能力
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3