- 积分
- 4371
- 明经币
- 个
- 注册时间
- 2018-4-19
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
2明经币
如果不加循环的话,量多了,使用起来,就不是很方便了,还请老师帮忙看看
(defun c:TT1()
(setvar "CMDECHO" 0)
(if *move* (setq Newmove (getreal (strcat "\n请输入偏移距离:<" (rtos *move* 2 2) ">:") ) )
(setq Newmove (getreal "\n请输入偏移距离:"))
)
(if (null Newmove) (setq Newmove *move*) (setq *move* Newmove))
(if (ssget '((0 . "Arc,Circle,Ellipse,*Line")))
(vlax-for o (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
(mapcar '(lambda (x)(vla-offset o x)) (list Newmove (- Newmove)))
)
)
(setvar "CMDECHO" 1)
(princ)
)
|
最佳答案
查看完整内容
(defun c:TT1 (/ newmove)
(setvar "CMDECHO" 0)
(if *move*
(setq Newmove (getreal (strcat "\n请输入偏移距离::")))
(setq Newmove (getreal "\n请输入偏移距离:"))
)
(if (null Newmove)
(setq Newmove *move*)
(setq *move* Newmove)
)
(while (ssget '((0 . "Arc,Circle,Ellipse,*Line")))
(vlax-for o (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
...
|