(defun c:11();改成洋红色块
(setvar "cmdecho" 0)
(command "undo" "be")
(if (null (tblsearch "LAYER" "LClayer"))
(entmake (list
'(0 . "LAYER")
'(100 . "AcDbSymbolTableRecord")
'(100 . "AcDbLayerTableRecord")
(cons 2 "LClayer") ;图层名称
'(70 . 0) ;图层状态
'(62 . 6) ;图层颜色
'(6 . "bylayer") ;图层线型
)
)
)
(setq p1 (getpoint "框选第一点"))
(setq p2 (getcorner p1 "\n框选对角点"))
(setvar "QAFLAGS" 1)
(command "explode" (ssget "c" p1 p2 ) "")
(setvar "QAFLAGS" 0)
(command "change" (ssget "c" p1 p2 ) "" "p" "c" "6" "")
(command "change" (ssget "c" p1 p2 ) "" "p" "la" "LClayer" "")
(ZG_MakeBlock (ssget "c" p1 p2 ))
(command "undo" "e")
(setvar "cmdecho" 1)
(princ)
) 感謝!!學到東西了
页:
1
[2]