CAD插件面板快捷键LISP源码教程
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Cad插件面板快捷键LISP源码实例Cad插件面板如下:
面板快捷键效果如下:
下边是源码:
(DEFUN G ETTOOLS P ATH (/ TMP)
(SETQ TMP"C:\\W INDOWS\\K_COM.TXT")
)
(DEFUN K_KJJ(/ DCL_ID D CL_F ILE D IALOG_R ETURN KEYS KEY LST1 FFK TMP UI% XJ E1 B A FF ) (VL-LOAD-COM)
(SETQ DCL_ID (LOAD_DIALOG (SETQ D CL_F ILE (W RITE_D CL_F ORM1))))
(VL-FILE-DELETE D CL_F ILE)
(SETQ D IALOG_R ETURN 2)
(WHILE (>D IALOG_R ETURN 1)
(NEW_DIALOG "F ORM1" DCL_ID)
(SETQ KEYS '("T EXT1""T EXT2""T EXT3""T EXT4""T EXT5""T EXT6""T EXT7""T EXT8" "T EXT9""T EXT10"
"T EXT11""T EXT12""T EXT13""T EXT14""T EXT15""T EXT16""T EXT17""T EXT18" "T EXT19""T EXT20"
"T EXT21""T EXT22""T EXT23""T EXT24""T EXT25""T EXT26""T EXT27""T EXT28" "T EXT29""T EXT30"
"T EXT31""T EXT32""T EXT33""T EXT34""T EXT35""T EXT36""T EXT37""T EXT38" "T EXT39""T EXT40"
"T EXT41""T EXT42""T EXT43""T EXT44""T EXT45""T EXT46""T EXT47""T EXT48" "T EXT49""T EXT50"
"T EXT51""T EXT52""T EXT53""T EXT54""T EXT55""T EXT56""T EXT57""T EXT58" "T EXT59""T EXT60"
"T EXT61""T EXT62""T EXT63""T EXT64""T EXT65""T EXT66""T EXT67""T EXT68" "T EXT69""T EXT70"
"T EXT71""T EXT72""T EXT73""T EXT74""T EXT75""T EXT76""T EXT77""T EXT78" "T EXT79""T EXT80"
"T EXT81""T EXT82""T EXT83""T EXT84""T EXT85""T EXT86""T EXT87""T EXT88" "T EXT89""T EXT90"
"T EXT91""T EXT92""T EXT93""T EXT94""T EXT95""T EXT96""T EXT97""T EXT98" "T EXT99""T EXT100"
"ACCEPT""CANCEL"))
(FOREACH KEY KEYS
(IF (EVAL (READ KEY ))(SET_TILE KEY (EVAL (READ KEY ))))
(ACTION_TILE KEY "(A CTION_F ORM1_K EYS $KEY )")
)
(SETQ LST1'())
(IF(SETQ FFK(OPEN (G ETTOOLS P ATH)"R"))
(PROGN(WHILE (SETQ TMP (READ-LINE FFK))(SETQ LST1(CONS TMP LST1)))(CLOSE FFK)
(SETQ LST1(REVERSE LST1))
(SETQ UI%0)
(REPEAT (LENGTH LST1)
(SETQ XJ (NTH UI% LST1))
(SETQ E1(VL-STRING-POSITION (ASCII ",") XJ)) (SETQ B (SUBSTR XJ 1 E1))
(SETQ A (SUBSTR XJ (+ E12)))
(SET_TILE (STRCAT "T EXT"(ITOA (+ UI%1))) B) (SETQ UI%(+1 UI%))
)
)
(PROGN
;;;图层显示
(SET_TILE "T EXT1""LL")
(SET_TILE "T EXT2""LK")
(SET_TILE "T EXT3""LP")
(SET_TILE "T EXT4""LY")
(SET_TILE "T EXT5""LO")
(SET_TILE "T EXT6""LU")
(SET_TILE "T EXT7""ACC")
(SET_TILE "T EXT8""L0")
(SET_TILE "T EXT9""CV")
(SET_TILE "T EXT10""CY")
(SET_TILE "T EXT11""CD")
(SET_TILE "T EXT12""VV")
(SET_TILE "T EXT13""VH")
(SET_TILE "T EXT14""VA")
(SET_TILE "T EXT15""KM")
(SET_TILE "T EXT16""FS")
(SET_TILE "T EXT17""LC")
(SET_TILE "T EXT18""SZC")
(SET_TILE "T EXT19""SXC")
(SET_TILE "T EXT20""SDC")
;;;文本属性
(SET_TILE "T EXT21""W2A")
(SET_TILE "T EXT22""A2W")
(SET_TILE "T EXT23""CA")
(SET_TILE "T EXT24""ZX")
(SET_TILE "T EXT25""C1")
(SET_TILE "T EXT26""WHH")
(SET_TILE "T EXT27""WW")
(SET_TILE "T EXT28""WEE")
(SET_TILE "T EXT29""WQQ")
(SET_TILE "T EXT30""WX")
(SET_TILE "T EXT31""WA")
(SET_TILE "T EXT32""FW")
(SET_TILE "T EXT33""WWS")