高手帮助!!!我想编一个cad lisp程序,镜像时选择直线,不用选择两点,谢谢!! 10
展开全部
(defun C:sm( / bl cm e1 ent0 ent1 os p1 p2 ss1)
( SetQ cm (GetVar "cmdecho") bl (GetVar "blipmode") os (GetVar "osmode"))
(SetVar "cmdecho" 0) (SetVar "blipmode" 0) (SetVar "osmode" 0)
(setq ent0 (entsel "\n请选择复制的对象:"))
(setq ent1 (entsel "\n请选择中心直线:")
e1 (car ent1)
ss1 (entget e1))
(setq p1 (Cdr (Assoc 10 ss1))
p2 (Cdr (Assoc 11 ss1)))
(command "mirror" ent0 ""p1 p2 "")
(SetVar "cmdecho" cm) (SetVar "blipmode" bl) (SetVar "osmode" os)
(PrinC)
)
( SetQ cm (GetVar "cmdecho") bl (GetVar "blipmode") os (GetVar "osmode"))
(SetVar "cmdecho" 0) (SetVar "blipmode" 0) (SetVar "osmode" 0)
(setq ent0 (entsel "\n请选择复制的对象:"))
(setq ent1 (entsel "\n请选择中心直线:")
e1 (car ent1)
ss1 (entget e1))
(setq p1 (Cdr (Assoc 10 ss1))
p2 (Cdr (Assoc 11 ss1)))
(command "mirror" ent0 ""p1 p2 "")
(SetVar "cmdecho" cm) (SetVar "blipmode" bl) (SetVar "osmode" os)
(PrinC)
)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询