我正在编写一个lisp文件来设置标题栏和比例,以便更快地选择图纸尺寸和比例来设置图形。我几乎只是在两种纸张大小之间切换,所以我为E大小的纸张绘制了一个视口,然后在视口中绘制一个矩形,表示D大小的纸张,以帮助计算出在这个lisp中使用的最佳比例和纸张大小。
我的问题是,我想添加我在lisp例程中使用的所有比例,但我通常会涉及如何在引号中添加“引号”,这些引号仅仅是文本。有人知道我该怎么写才能成功吗?任何帮助都将不胜感激。
这是我遇到问题的命令示例:
(命令“-scalelistedit”“a”“1”=50'-0”“1:600”“e”)
此外,我知道我不必一直退出命令“scalelistedit”并输入以添加多个比例,我只是初步这样做。
- (defun c:tbss(/ point1 point2 point3 point4 )
- (setvar "cmdecho" 0)
- (command ".-layer" "n" "G-Vprt" "")
- (command ".-layer" "c" "211" "G-Vprt" "")
- (command ".-layer" "p" "n" "G-Vprt" "")
- (command ".layout" "s" "")
- (setq old_clayer (getvar "clayer"))
- (command ".-layer" "S" "G-Vprt" "")
- (setq point1 (list 0.5 0.3125 0.0) point2 (list 37.7875 29.2275 0.0))
- (setq point3 (list 3.1438 3.3638 0.0) point4 (list 35.1438 26.1762 0.0))
- (command ".-vports" point1 point2)
- (command "rectangle" point3 point4)
- (command "-scalelistedit" "a" "1" = 1'-0" "1:12" "e")
- (command "-scalelistedit" "a" "1/2" = 1'-0" "0.5:12" "e")
- (command "-scalelistedit" "a" "1/4" = 1'-0" "0.25:12" "e")
- (command "-scalelistedit" "a" "3/16" = 1'-0" "0.01875:12" "e")
- (command "-scalelistedit" "a" "1/8" = 1'-0" "0.125:12" "e")
- (command "-scalelistedit" "a" "3/32" = 1'-0" "0.09375:12" "e")
- (command "-scalelistedit" "a" "1/16" = 1'-0" "0.0625:12" "e")
- (command "-scalelistedit" "a" "1/32" = 1'-0" "0.03125:12" "e")
- (command "-scalelistedit" "a" "1/64" = 1'-0" "0.015625:12" "e")
- (command "-scalelistedit" "a" "1" = 10'-0" "1:120" "e")
- (command "-scalelistedit" "a" "1" = 20'-0" "1:240" "e")
- (command "-scalelistedit" "a" "1" = 30'-0" "1:360" "e")
- (command "-scalelistedit" "a" "1" = 40'-0" "1:480" "e")
- (command "-scalelistedit" "a" "1" = 50'-0" "1:600" "e")
- (command "-layer" "S" old_clayer "")
- (setvar "cmdecho" 1)
- (princ)
- )
- (prompt "Title Block and Scale Setup Loaded.")
|