省略大量无用的文本
我有代码,你们这些了不起的人到目前为止一直在帮助我。但当我应用它时,我的auto cad控制台会充满所有这些“选项”,用于输入数字、字母和自动发生的事情。我只是想知道是否可以从文本窗口中选择要忽略的内容。有一点很重要,看看我留下了什么数字继续,或者我如何标记某些点。我要发布代码,因为我想我必须这么做。
(defun c:p2f(/ p x y z j k ptcoord textloc cs_from cs_to file text filename
rstr space xlen ylen zlen modspace)
(setq filename (strcat "c:\\"(getstring "\nEnter File Name")".txt"))
(setq k (getstring "\nEnter PREFIX"))
(setq j (getint "\nEnter Start Number"))
(while ;start while
(setq p (getpoint "Pick Point"))
(setq cs_from 1)
(setq cs_to 0)
(setq p1 (trans p cs_from cs_to 0))
(setq textloc (getpoint p "PLACE TEXT"))
(setq rstr 12)
(setq space (strcat " "))
(setq x (rtos (car p1)))
(setq y (rtos (cadr p1)))
(setq z (rtos (caddr P1)))
(setq xlen (strlen x))
(setq ylen (strlen y))
(setq zlen (strlen z))
(setq modspacex (substr space 1 (- rstr xlen)))
(setq modspacey (substr space 1 (- rstr ylen)))
(setq modspacez (substr space 1 (- rstr zlen)))
(setq ptcoord (strcat k (rtos j 2 0)"\t" modspacex x"\t" modspacey y"\t"
modspacez z))
(command "_leader" p textloc "" ptcoord "")
(setq file (open filename "a"))
(write-line ptcoord file)
(close file)
(setq j (+ j 1))
) ;end while
)
到目前为止,我喜欢它的工作方式,所以我不想搞砸它。我只是想知道是否有更好的方法来实现“多重领导”,而不需要它的提示和自动填充,或者至少省略这个过程。
另一个想法是,它创建ti自己的文本窗口,只显示它在记事本中实际写下的内容。我也不知道该怎么做。谷歌搜索一直对我很不宽容。
谢谢你的建议。 您可以设置一些系统变量,如CmdEcho、NoMutt、Expert等,但您无法摆脱所有问题。或者,您可以将命令调用更改为纯编程方法。。。例如:http://www.theswamp.org/index.php?topic=42930.0
http://forums.augi.com/showthread.php?82591-How-do-I-use-the-Active-X-function-AddMleader-in-Lisp 含糖的很有魅力!谢谢 很乐意帮忙
页:
[1]