(if (null (tblsearch "layer" "图层名称"))
(entmake (list'(0 . "LAYER")'(100 . "AcDbSymbolTableRecord")'(100 . "AcDbLayerTableRecord") '(6 . "Center") '(62 . 1) '(370 . 0) '(70 . 0) '(290 . 1) '(2 . "图层名称")))
;6组码【线型】,62组码【颜色】,370组码【线宽】,70组码【可见】,290组码【打印】,2组码【图层名称】
);autolisp建立图层
温馨提示:内容为网友见解,仅供参考