来个例子:- (defun c:tt nil
- (setq obj(vlax-ename->vla-object (car(entsel "\n选择非闭合多段线")))
- pt0 (getpoint "\n指定新的起点")
- en_pt(getpoint "\n指定新的终点")
- vb_pt0(vlax-safearray-fill(vlax-make-safearray vlax-vbdouble '(0 . 1)) (list(car pt0)(cadr pt0)))
- vb_endpt(vlax-safearray-fill(vlax-make-safearray vlax-vbdouble '(0 . 1)) (list(car en_pt)(cadr en_pt)))
- end_pt0(vlax-curve-getendPoint obj)
- end_index(fix (vlax-curve-getParamAtPoint obj end_pt0))
- )
- (and obj vb_pt0 (vla-put-Coordinate obj 0 vb_pt0))
- (and obj vb_endpt (vla-put-Coordinate obj end_index vb_endpt))
- )
|