自动生成图层 LISP程序
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
(command "layer" "s" "4" "" "") (princ) ) (defun c:5 ()
(command "layer" "s" "5" "" "") (princ) ) (defun c:0 ()
(command "layer" "s" "0" "" "") (princ) ) (defun c:6 ()
) ;如有层 3 就不执行 (if (not (tblsearch "layer" "1")) ;;你图内无层 1
(command "layer" "n" "1" "c" "1" "1" "") ;去建层 1 把色 1(红)付偶给 1 层 ) ;如有层 1 就不执行 (if (not (tblsearch "layer" "2")) ;;你图内无层 2
;定义快速切换线层 (defun c:1 ()
(command "layer" "s" "1" "" "") (princ) ) (defun c:2 ()
(command "layer" "s" "2" "" "") (princ) ) (defun c:3 ()
(command "layer" "s" "3" "" "") (princ) ) (defun c:4 ()
(command "layer" "n" "5" "c" "5" "5" "") ;去建层 5 把色 5(蓝色)付偶给 5 层 ) ;如有层 5 就不执行 (if (not (tblsearch "layer" "6")) ;;你图内无层 6
(command "layer" "n" "6" "c" "6" "6" "") ;去建层 6 把色 6(洋红色)付偶给 6 层 ) ;如有层 6 就不执行 (if (not (tblsearch "layer" "7")) ;;你图内无层 7
;加载线型 (if (not (tblobjname "ltype" "Center") ) (command "linetype" "l" "center" "" "")
) (if (not (tblobjname "ltype" "jis_09_15") ) (command "linetype" "l" "jis_09_15" "" "")
) (if (not (tblobjname "ltype" "acad_iso02w100") ) (command "linetype" "l" "acad_iso02w100" "" "")
)
;加载图层
(if (not (tblsearch "layer" "3")) ;;你图内无层 3 (command "layer"Hale Waihona Puke Baidu"n" "3" "c" "3" "3" "") ;去建层 3 把色 3(绿色)付偶给 3 层
(command "layer" "n" "7" "c" "7" "7" "") ;去建层 7 把色 7(白色)付偶给 7 层 ) ;如有层 7 就不执行
;付给线型 线宽 (command "layer" "l" "center" "1" "") (command "layer" "l" "jis_09_15" "4" "") (command "layer" "l" "acad_iso02w100" "6" "") (command "layer" "lw" "0.25" "7" "")
(command "layer" "n" "2" "c" "2" "2" "") ;去建层 2 把色 2(黄)付偶给 2 层 ) ;如有层 2 就不执行 (if (not (tblsearch "layer" "4")) ;;你图内无层 4
(command "layer" "n" "4" "c" "4" "4" "") ;去建层 4 把色 4(青色)付偶给 4 层 ) ;如有层 4 就不执行 (if (not (tblsearch "layer" "5")) ;;你图内无层 5
(command "layer" "s" "6" "" "") (princ) ) (defun c:7 ()
(command "layer" "s" "7" "" "") (princ) )
(command "layer" "s" "5" "" "") (princ) ) (defun c:0 ()
(command "layer" "s" "0" "" "") (princ) ) (defun c:6 ()
) ;如有层 3 就不执行 (if (not (tblsearch "layer" "1")) ;;你图内无层 1
(command "layer" "n" "1" "c" "1" "1" "") ;去建层 1 把色 1(红)付偶给 1 层 ) ;如有层 1 就不执行 (if (not (tblsearch "layer" "2")) ;;你图内无层 2
;定义快速切换线层 (defun c:1 ()
(command "layer" "s" "1" "" "") (princ) ) (defun c:2 ()
(command "layer" "s" "2" "" "") (princ) ) (defun c:3 ()
(command "layer" "s" "3" "" "") (princ) ) (defun c:4 ()
(command "layer" "n" "5" "c" "5" "5" "") ;去建层 5 把色 5(蓝色)付偶给 5 层 ) ;如有层 5 就不执行 (if (not (tblsearch "layer" "6")) ;;你图内无层 6
(command "layer" "n" "6" "c" "6" "6" "") ;去建层 6 把色 6(洋红色)付偶给 6 层 ) ;如有层 6 就不执行 (if (not (tblsearch "layer" "7")) ;;你图内无层 7
;加载线型 (if (not (tblobjname "ltype" "Center") ) (command "linetype" "l" "center" "" "")
) (if (not (tblobjname "ltype" "jis_09_15") ) (command "linetype" "l" "jis_09_15" "" "")
) (if (not (tblobjname "ltype" "acad_iso02w100") ) (command "linetype" "l" "acad_iso02w100" "" "")
)
;加载图层
(if (not (tblsearch "layer" "3")) ;;你图内无层 3 (command "layer"Hale Waihona Puke Baidu"n" "3" "c" "3" "3" "") ;去建层 3 把色 3(绿色)付偶给 3 层
(command "layer" "n" "7" "c" "7" "7" "") ;去建层 7 把色 7(白色)付偶给 7 层 ) ;如有层 7 就不执行
;付给线型 线宽 (command "layer" "l" "center" "1" "") (command "layer" "l" "jis_09_15" "4" "") (command "layer" "l" "acad_iso02w100" "6" "") (command "layer" "lw" "0.25" "7" "")
(command "layer" "n" "2" "c" "2" "2" "") ;去建层 2 把色 2(黄)付偶给 2 层 ) ;如有层 2 就不执行 (if (not (tblsearch "layer" "4")) ;;你图内无层 4
(command "layer" "n" "4" "c" "4" "4" "") ;去建层 4 把色 4(青色)付偶给 4 层 ) ;如有层 4 就不执行 (if (not (tblsearch "layer" "5")) ;;你图内无层 5
(command "layer" "s" "6" "" "") (princ) ) (defun c:7 ()
(command "layer" "s" "7" "" "") (princ) )