- (defun c:tt ()
- "双偏去中线"
- (defun udist (bit kwd msg def bpt / inp)
- (if def
- (setq msg (strcat "\n" msg "<" (rtos def) ">: ")
- bit (* 2 (fix (/ bit 2)))
- )
- (setq msg (strcat "\n" msg ": "))
- )
- (initget bit kwd)
- (setq inp(if bpt(getdist msg bpt)(getdist msg)))
- (if inp inp def)
- )
- (or dd (setq dd 20.))
- (setq dd (Udist 7 "" "距离<输入或鼠标直接量取>" dd nil)
- d1 (* dd 0.5)
- )
- (setq i -1)
- (if (setq ss (ssget))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq ob (vlax-ename->vla-object s1))
- (vla-offset ob d1)
- (vla-offset ob (- d1))
- (entdel s1)
- )
- )
- (princ)
- )
|