;驱动尺寸[mini_qdcc].lsp
(defun c:mini_qdcc ( / old_cmd ep n_ep n_sp sd ang midp sp p1 p2 p3 p4 )
  (mini_start nil)
  (setq sd (mai_Entsel nil "选择驱动尺寸:" '((0 . "*dim*")) nil))
  (or sd (exit))
  (setq sd (entget (car sd))
        sp (trans (mai_dxf 13 sd) 0 1)
        ep (trans (mai_dxf 14 sd) 0 1)
        sd (getdist (strcat "\n新的长度:<" (rtos (distance sp ep) 2 2) ">"))
  )
  (or sd (exit))
  (setq sd (* 0.5 sd)
        ang (angle sp ep)
        midp (mai_divide_point sp ep 0.5)
        n_sp (polar midp ang (- sd))
        n_ep (polar midp ang sd)
		p1 (mai_point_offset sp -0.03 -0.03)
		p2 (mai_point_offset sp 0.03 0.03)
		p3 (mai_point_offset ep -0.03 -0.03)
		p4 (mai_point_offset ep 0.03 0.03)
  )
  (if (ssget "c" p1 p2)
      (command "_.stretch" "c" "non" p1 "non" p2 "" "non" sp "non" n_sp)
  )
  (if (ssget "c" p3 p4)
      (command "_.stretch" "c" "non" p3 "non" p4 "" "non" ep "non" n_ep)
  )
  (mai_end)
)