- 积分
- 3864
- 明经币
- 个
- 注册时间
- 2010-11-26
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
我的程序主要功能是建立图层,但输入比例却会出现问题,不相关联。下面的是我的程序:
- (defun c:wc ()
- (setvar "cmdecho" 0)
- (setq ur1 (getvar "userr1"))
- (if (= ur1 0) (setq ur1 1))
- (setq ur2 (getreal (strcat "\n打印比例 1:" "<" (rtos ur1 2) ">")))
- (if (= ur2 nil) (setq ur2 ur1))
- (setq r2 (/ ur2 100))
- (setvar "userr1" ur2)
- (command "-linetype" "l" "center" "" "" "")
- (command "-linetype" "l" "dash1" "" "" "")
- (command "-linetype" "l" "dash" "" "" "")
- (command "ltscale" (* ur2 10))
- (command "-style" "GB" "gbxwxt.shx,gbhzfs.shx" (* 250 r2) "0.7" "" "" "" "")
- (command "-style" "BH" "romanc.shx" "" "" "" "" "" "")
- (command "-style" "DIM_Font" "simplex.shx" "" "" "" "" "" "")
- (command "-style" "TM" "SIMFANG.TTF" (* 700 r2) "" "" "" "" "")
- ;(command "dimstyle" "s" "STANDARD" "y" "")
- (setq p0 (list 0.0 0.0 0.0))
- (command "-insert" "whblk.dwg" p0 "1" "1" "1" "0")
- (setq en1 (entlast))
- (entdel en1)
-
- (command "dimasz" (* 80 r2) )
- (command "dimcen" (* 300 r2))
- (command "dimclrt" 7)
- (command "dimdec" 0)
- (command "dimdli" 0.0000)
- (command "dimexe" (* 200 r2))
- (command "dimexo" (* 300 r2))
- (command "dimgap" (* 80 r2))
- (command "dimtxsty" "GB")
- (command "dimtxt" (* 250 r2))
- (command "dimtmove" 2)
- (command "layer" "m" "DOTE" "m" "AXIS" "m" "AXIS_TEXT" "m" "DIM" "m" "DT" "m" "DT-BH" "m" "DT-FZ" "")
- (command "layer" "m" "C-T0" "m" "C-T1" "m" "C-H" "m" "Q-L0" "m" "Q-H" "m" "R-L0" "m" "R-L1" "")
- (command "layer" "m" "L-K0" "m" "L-K1" "m" "L-BH" "m" "L-HH" "m" "L-H" "m" "L-VV" "m" "L-V" "")
- (command "layer" "m" "BJ-L" "m" "BJ-T" "m" "JB-L" "m" "JB-H" "m" "HJ-H" "m" "H0" "m" "R0" "m" "R1" "")
- (command "layer" "m" "TM" "m" "JM" "m" "LK" "m" "D0" "m" "D1" "m" "1" "m" "2" "m" "defpoints" "")
- ;(command "layer" "n" "DOTE,AXIS,AXIS_TEXT,C-T0,C-T1,C-H,DIM,Q-L0,Q-H,R-L0,R-L1" "")
- ;(command "layer" "n" "L-K0,L-K1,L-BH,L-HH,L-H,L-VV,L-V,BJ-L,BJ-T,JB-L,JB-H,LK,HJ-H" "")
- ;(command "layer" "n" "DT,DT-BH,DT-FZ,R0,R1,TM,JM,D0,D1,H0,1,2,defpoints" "")
- ;(command "layer" "n" "JC-L,CT-X,CT-S,ZH-L,ZH-L400,ZH-L500,ZH-L600,ZBH" "")
- ;(command "layer" "n" "D-W,D-E,D-H,D-T,D-G" "")
- (command "layer" "c" 1 "DOTE,JB-H" "")
- (command "layer" "c" 2 "BJ-L,R0,R1,2" "")
- (command "layer" "c" 3 "AXIS,DIM,Q-L0,L-BH,BJ-T,LK,HJ-H,DT,DT-FZ,TM,1" "")
- (command "layer" "c" 4 "L-K0,L-K1,JB-L,JM" "")
- (command "layer" "c" 8 "C-H" "c" 9 "H0" "c" 10 "D0,D1" "c" 11 "R-L0,R-L1" "c" 50 "C-T0,C-T1" "")
- (command "layer" "l" "CENTER" "DOTE" "l" "DASH1" "HJ-H" "")
- (command "layer" "l" "DASH" "C-T1,R-L1,L-K1,R1,D1" "")
- (command "regen")
- (princ)
- (princ)(princ)(princ)(princ)(princ)
- )
|
|