文件名称:cad 二次开发教程,很详细,配合cad使用
文件大小:371KB
文件格式:CHM
更新时间:2012-01-14 16:22:42
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))