搜索
您的当前位置:首页正文

AutoLisp 源代码 实用程序10

来源:好土汽车网
(defun c:12 (/ unit di ckc dimb dimm dii) (setq unit (getvar \"lunits\")) (if (= unit 2) (setq di 10) (setq di 0.5) )

(setq ckc (getstring \"\\nInput the character: Adjust/aLign(A/L)\")) (if (or (= ckc \"a\") (= ckc \"A\")) (12a) )

(if (or (= ckc \"l\") (= ckc \"L\")) (12l) )

(princ) )

;============================================= (defun 12a ()

(setq dimb (entsel \"\\nSelect the base dimension: \")) (setq dimm (ssget)) (setq dii (getreal

(strcat \"\\nInput the distance<\" (rtos di unit 4) \">: \") ) )

(if (= dii nil) (setq dii di) )

(command \"dimspace\" dimb dimm \"\" dii) )

;============================================= (defun 12l ()

(setq dimb (entsel \"\\nSelect the base dimension: \")) (setq dimm (ssget)) (setq dii 0)

(command \"dimspace\" dimb dimm \"\" dii) )

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (defun c:dli (/ unit dims ckc1 ckc whin ckc2) (setvar \"osmode\" 1279)

(setq oldos (getvar \"osmode\")) (setq unit (getvar \"lunits\"))

(setvar \"CLAYER\" \"TXT\")

(if (= unit 4) (progn

(setq dims 0.5)

(setq dsi1 \"PSLSTD-I\") (setq dsi2 \"PSLTAIL-I\") )

(progn

(setq dims 10)

(setq dsi1 \"PSLSTD-M1\") (setq dsi2 \"PSLTAIL-M\") ) )

(setq ckc1 (getstring \"\\nStd or Tail(S/T): \")) (if (or (= ckc1 \"s\") (= ckc1 \"S\")) (progn

(command \"dimstyle\" \"\" dsi1) ) )

(if (or (= ckc1 \"t\") (= ckc1 \"T\")) (progn

(command \"dimstyle\" \"\" dsi2) ) )

(princ \"\\nSepcify the two point: \") (command \"dimlinear\" pause pause pause) (command \"DIMDISASSOCIATE\" (entlast) \"\")

(setq ckc \"L\") (setq whin 0)

(while (< whin 200) (setq

ckc2 (getstring

\"\\ndimLinear/dimContinue/dimBaseline/Closed(L/T/B/C/S): \" ) )

(if (or (= ckc2 \"s\") (= ckc2 \"S\")) (progn

(if (or (= ckc1 \"t\") (= ckc1 \"T\")) (progn

(setq ckc1 \"s\")

(command \"dimstyle\" \"\" dsi1)

)

(progn

(setq ckc1 \"t\")

(command \"dimstyle\" \"\" dsi2)

) )

(princ \"Change the dimstyle!\") ) )

(if (= ckc2 \"\") (setq ckc2 ckc) )

(if (or (= ckc2 \"l\") (= ckc2 \"L\")) (progn

(princ \"\\nSepcify the two point: \") (command \"dimlinear\" pause pause pause) (command \"DIMDISASSOCIATE\" (entlast) \"\") ) )

(if (or (= ckc2 \"t\") (= ckc2 \"T\")) (progn

(command \"dimstyle\" \"\" dsi1)

(command \"dimcontinue\" pause \"\" \"\")

(command \"DIMDISASSOCIATE\" (entlast) \"\") ) )

(if (or (= ckc2 \"b\") (= ckc2 \"B\")) (progn

(if (or (= ckc1 \"t\") (= ckc1 \"T\")) (progn

(setvar \"dimdli\" 0)

(command \"dimbaseline\" pause \"\" \"\")

(command \"DIMDISASSOCIATE\" (entlast) \"\") )

(progn

(setvar \"dimdli\" dims)

(command \"dimbaseline\" pause \"\" \"\")

(command \"DIMDISASSOCIATE\" (entlast) \"\") ) ) )

)

(if (or (= ckc2 \"e\") (= ckc2 \"E\")) (entdel (entlast)) )

(if (or (= ckc2 \"c\") (= ckc2 \"C\")) (setq whin 201) )

(setq ckc ckc2)

) ; end while (command \"dimstyle\" \"\" dsi1) (setvar \"osmode\" oldos) (princ)

) ;end defun

因篇幅问题不能全部显示,请点此查看更多更全内容

Top