精華區beta Cad_Cae 關於我們 聯絡資訊
AutoLISP 是interpreter 解譯式的程式, 所以,你只要用任何文書處理程式, 儲存檔案名稱為 xxx.LSP, 就可以在AutoCAD 裡面的指令行下面 輸入並立刻執行你所寫的程式 (LOAD "XXX") 以下,為一個簡單的例子,求 1+2+3+..+no= ? ; file: SUM-1.LSP (setq no (getint "\nPlease input a number for test: ")) (setq sum 0 i 1) (while (<= i no) (setq sum (+ sum i)) (setq i (1+ i)) ) (princ "sum= ") (princ sum) (princ) ; end of file -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.243.237.65