(defun c:dims ();;设置尺寸变量"dimscal"的值。
(prompt "程序设计:by heyong")
(setq txthight (getvar "dimtxt"));;取得系统变量"dimtxt"的值。
(if RamScale
(setq drawingscale (getstring (strcat "\n请输入绘图比例:" "<" RamScale ">")));;指打印出来的纸质图纸上"比例"栏应填的实际数值。
(setq drawingscale (getstring (strcat "\n请输入绘图比例:" "<" ">")))
)
(if (= drawingscale "")
(setq RamScale RamScale)
(setq RamScale drawingscale)
)
(if RamHight
(setq realtextHight (getstring (strcat "\n请输入图纸上的文字高度:" "<" RamHight ">")));;指打印出来的纸质图纸上的实际文字高度。
(setq realtextHight (getstring (strcat "\n请输入图纸上的文字高度:" "<" ">")))
)
(if (= realtextHight "")
(setq RamHight RamHight)
(setq RamHight realtextHight)
)
(if (or (= RamScale nil)(= RamHight nil))
(progn
(princ "系统变\"dimscale\"设置未改变!")
(prin1)
);;end progn
(progn
(setq dim_scale (/ (* (atof RamHight) (atof RamScale)) txthight))
(setvar "dimscale" dim_scale)
(princ (strcat "\n系统变\"dimscale\"已设置为:"(rtos dim_scale) "\n绘图比例为:" "1:" RamScale))
(prin1)
(princ (strcat "\n屏幕显示尺寸文本高度为:" (rtos (* (atof RamHight) (atof RamScale))) "mm" "\n纸质图纸上尺寸文本高度为:" RamHight "mm"))
(prin1)
);;end progn
)
);;end dims
网友答: 大佬,这个在什么状况用呀?网友答: 一般都是A1图框,
(prompt "程序设计:by heyong")
(setq txthight (getvar "dimtxt"));;取得系统变量"dimtxt"的值。
(if RamScale
(setq drawingscale (getstring (strcat "\n请输入绘图比例:" "<" RamScale ">")));;指打印出来的纸质图纸上"比例"栏应填的实际数值。
(setq drawingscale (getstring (strcat "\n请输入绘图比例:" "<" ">")))
)
(if (= drawingscale "")
(setq RamScale RamScale)
(setq RamScale drawingscale)
)
(if RamHight
(setq realtextHight (getstring (strcat "\n请输入图纸上的文字高度:" "<" RamHight ">")));;指打印出来的纸质图纸上的实际文字高度。
(setq realtextHight (getstring (strcat "\n请输入图纸上的文字高度:" "<" ">")))
)
(if (= realtextHight "")
(setq RamHight RamHight)
(setq RamHight realtextHight)
)
(if (or (= RamScale nil)(= RamHight nil))
(progn
(princ "系统变\"dimscale\"设置未改变!")
(prin1)
);;end progn
(progn
(setq dim_scale (/ (* (atof RamHight) (atof RamScale)) txthight))
(setvar "dimscale" dim_scale)
(princ (strcat "\n系统变\"dimscale\"已设置为:"(rtos dim_scale) "\n绘图比例为:" "1:" RamScale))
(prin1)
(princ (strcat "\n屏幕显示尺寸文本高度为:" (rtos (* (atof RamHight) (atof RamScale))) "mm" "\n纸质图纸上尺寸文本高度为:" RamHight "mm"))
(prin1)
);;end progn
)
);;end dims
网友答: 大佬,这个在什么状况用呀?网友答: 一般都是A1图框,