不确定VBA,但可能可以翻译为:
- (defun c:foo (/ e p)
- (cond ((and (setq e (entsel "\nPick polyline near an end: "))
- (= "LWPOLYLINE" (cdr (assoc 0 (entget (car e)))))
- (setq p (vlax-curve-getclosestpointto (car e) (cadr e)))
- )
- (if (= 0 (fix (vlax-curve-getparamatpoint (setq e (car e)) p)))
- (vlax-curve-getstartpoint e)
- (vlax-curve-getendpoint e)
- )
- )
- )
- )
|