如果线段不多的话,可以使用join加强版- ;
- (defun ss-sslist (ss / n en enlis)
- (setq n (sslength ss))
- (repeat n
- (setq en (ssname ss (setq n (1- n))))
- (setq enlis (cons en enlis))
- )
- )
- (defun c:test (/ ss)
- (setvar "CMDECHO" 0)
- (command "undo" "be")
- (setq ss (ssget))
- (setq ss (ss-sslist ss))
- (foreach x ss
- (mapcar '(lambda (y)
- (command "join" x y "")
- )
- ss
- )
- )
- (command "undo" "e")
- (setvar "CMDECHO" 1)
- (princ)
- )
|