- (defun c:ggqj (/ pl1 pl2 PT-LST1 PT-LST2)
- (command "._undo" "begin")
- (setvar "cmdecho" 0)
- (setq pl1 (car (entsel "\n选择原始轮廓线"))
- pl2 (car (entsel "\n选择要连接的轮廓线")))
- ;;然后得到点表,再连接起来
- (setq PT-LST1 (mapcar 'cdr (vl-remove-if-not '(lambda (x) (or (= (car x) 10)(= (car x) 11))) (entget pl1))))
- (setq PT-LST2 (mapcar 'cdr (vl-remove-if-not '(lambda (x) (or (= (car x) 10)(= (car x) 11))) (entget pl2))))
- (mapcar '(lambda (x y) (entmake (list '(0 . "LINE") (cons 10 x) (cons 11 y)))) PT-LST1 PT-LST2)
- (command "._undo" "end")
- (princ "\n************完成连线*********")
- )
|