本帖最后由 lee50310 于 2021-4-21 10:46 编辑
原帖:http://bbs.mjtd.com/thread-178824-1-1.html
執行指令:tt
部份程式碼:;----------------------------------------------------------------------------------------------
- (vl-load-com)
- (SaveVars (list "osmode" "cmdecho" "orthomode" "DIMDEC" "clayer")) ;儲存目前的系統變數
- (setvar "osmode" 0) ; 關閉目標捕捉狀態
- (setvar "orthomode" 0) ; 關閉垂直正交
- (setvar "WHIPARC" 1) ;打開真圓度
- (command "-LAYER" "P" "N" "0" "") ;將0層設為不顯示圖層視窗
-
- (foreach x '(("tst" 7) ("temp" 2) ("0-JG-Str-line" 4) ("0-JG-Rebar" 1))
- (if (not (tblsearch "layer" (car x))) ;判斷圖檔中是否有此圖層名,若無則創建這些圖層及顏色
- (layer x)
- )
- )
- (if (= dt nil) (setq dt 10)) ;偏移距離初設 10
- (setq of (getdist (strcat "輸入偏移距離:<" (rtos dt) ">")))
- (if (= of nil)(setq of dt )(setq dt of))
-
- (setq ssall (ssget '((0 . "*LINE,ARC,CIRCLE,ELLIPSE"))))
;------------------------------------------------------------------------------------------------------------
|