- (defun c:xe();;炸多重块+块中块
- (setq
- osmode (getvar "osmode")
- cmdecho (getvar "cmdecho")
- )
- (setvar "cmdecho" 0)
- (setvar "osmode" 0)
- (command "undo" "g")
- (setq ss(ssget '((0 . "insert"))) lenss(sslength ss) i 0 j 0 bss(ssadd))
- (repeat lenss
- (setq bi(ssname ss i))
- (mapcar '(lambda(x)(if (member '(100 . "AcDbMInsertBlock") x)
- (ssadd bi bss))
- )
- (list (entget bi))
- )
- (setq i(1+ i))
- )
- (setq lenbss(sslength bss))
- (repeat lenbss
- (setq mi(ssname bss j) midxf(entget mi))
- (setq dx70(dxf 70 mi)
- dx71(dxf 71 mi)
- dx44(dxf 44 mi)
- dx45(dxf 45 mi)
- dx50(dxf 50 mi)
- )
- (entmake (vl-remove-if '(lambda (x) (member (car x) '(100 70 71 44 45)))midxf))
- (setvar "QAFLAGS" 1)
- (command ".select" (entlast) "" "explode" "p" "")
- (setq x1 (ssget "p"))
- (while (setq xi(ssget "p" '((0 . "INSERT"))))
- (vl-cmdf "explode" xi ""))
- (setq x2 (ssget "p"))
- (command ".select" x1 "r" x2 "")
- (command "select" "p" x2 "")
- (setvar "QAFLAGS" 0)
- (if (/= dx50 0)
- (progn
- (command "ucs" "n" "3" "0,0" (polar '(0 0) dx50 1) (polar '(0 0) (+ dx50 (/ pi 2)) 1) "")
- (command "array" "p" "" "r" dx71 dx70 dx45 dx44 "")
- (command "ucs" "p" "")
- )
- (command "array" "p" "" "r" dx71 dx70 dx45 dx44 "")
- )
- (entdel mi)
- (setq j(1+ j))
- )
- (princ)
- (command "undo" "e")
- (setvar "osmode" osmode)
- (setvar "cmdecho" cmdecho)
- (princ)
- )
- ;;;;;
|