(defun c:pl_sub_width (/ w1 w2 a d p n)
  (vl-load-com)
  (while (setq a (entsel "选择复义线:"))
    (setq d (vlax-ename->vla-object (car a)))
    (setq p (vlax-curve-getclosestpointto d (trans (cadr a) 1 0)))
    (setq n (fix (vlax-curve-getparamatpoint d p)))
    (or w1 (vlax-invoke-method d 'setwidth n (/ (getvar "viewsize") 10) 0))
    (or w1 (setq w1 (getreal "\n起点宽度:")))
    (or w1 (setq w1 0))
    (or w2 (setq w2 (getreal "\n终点宽度:")))
    (or w2 (setq w2 w1))
    (vlax-invoke-method d 'setwidth n w1 w2 )
  )
)