-
配合CAD使用的二次开发教程,内容详尽
资源介绍
lisp语言,<>
(DEFUN C:RECT ( )
(SETQ PT_START (GETPOINT "Select first point")
PT_END (GETCORNER PT_START "Select second point")
PT_TMP1 (LIST (CAR PT_START) (CADR PT_END))
PT_TMP2 (LIST (CAR PT_END) (CADR PT_START)))
(COMMAND "PLINE" PT_START PT_TMP1 PT_END PT_TMP2 "C")
(COMMAND "SELECT" "L" "")
(INITGET 128 "Yes No")
(SETQ YESNO (GETKWORD "Diagonal Line (Y/N) : "))
(IF (= YESNO "Yes") (PROGN
(COMMAND "LINE" PT_START PT_END "")
(COMMAND "SELECT" "P" "L" "")
(COMMAND "LINE" PT_TMP1 PT_TMP2 "")
(COMMAND "SELECT" "P" "L" "")
) )
(COMMAND "ROTATE" "P" "" PT_START
(* (GETANGLE PT_START "Rotate Angle : ") (/ 180 PI)))
(PRINC))
- 上一篇: CAD二次开发源码
- 下一篇: e语言-易语言文件读写类模块