一个老问题,为什么不CHX CHY CHZ,并要求空间,而不是硬代码。
- (defun c:CHX (/ ss )
- (setq diff (Getreal "\nEnter distance required" ))
- (if (setq ss (ssget "_:L" ))
- (vl-cmdf "_.move" ss "" "_non" '(0. 0. 0.) "_non" '(diff 0. 0.))
- )
- (princ)
- CHY '(0. diff 0.)
- )
- Version 2, 1 spacing per session
- (if (= diff nil)
- (setq diff (Getreal "\nEnter distance required" ))
- )
- (if (setq ss (ssget "_:L" ))
- (vl-cmdf "_.move" ss "" "_non" '(0. 0. 0.) "_non" '(diff 0. 0.))
- )
像选择集一样,我的旧版本是pick pick |