求助
如何返回文本的旋转角度。谢谢组码 50
(50 . 0.523599) (defun c:ww(/ M_text dlang M_x M_y)
(setq M_text (ssget))
(setq dlang ???.rotation) ;获取图元旋转角度
(setq M_x sin(dlang)*5) ;移动图元x
(setq M_y cos(dlang)*5) ;移动图元y
(command "move" M_text "" '(0 0 0) '(M_x M_y 0))
(prin1)
)
求大神帮助修改下 本帖最后由 血司 于 2018-4-15 14:18 编辑
(defun c:lxy (/ ent rad)
(setvar "OSMODE" 0)
(setq ent (car (entsel)))
(setq rad (Vlax-Get (Vlax-Ename->Vla-Object ent) 'Rotation ))
(command "_move" ent "" (list 0 0) (list (* (sin rad) 5) (* (cos rad) 5)))
(princ)
) 有效。谢谢
页:
[1]