- entmake生成普通块
- (defun emkblk (ss pt name / i)
- (entmake (list '(0 . "block") (cons 2 name) '(70 . 0) (cons 10 pt)))
- (repeat (setq i (sslength ss)) (entmake (cdr (entget (ssname ss (setq i (1- i)))))) )
- (entmake '((0 . "ENDBLK")))
- (command "_.erase" ss "")
- (entmake (list '(0 . "INSERT") (cons 2 name) (cons 10 pt)))
- )
-
- entmake插入普通块
- (entmake (list '(0 . "INSERT") (cons 2 name) (cons 10 pt)))
- entmake生成无名块
- (defun emkunameblk (ss pt / i name)
- (entmake (list '(0 . "block") '(2 . "*U") '(70 . 1) (cons 10 pt)))
- (repeat (setq i (sslength ss)) (entmake (cdr (entget (ssname ss (setq i (1- i)))))) )
- (setq name (entmake '((0 . "ENDBLK"))))
- (command "_.erase" ss "")
- (entmake (list '(0 . "INSERT") (cons 2 name) (cons 10 pt)))
- name
- )
希望这三个函数能够帮到你。
|