解决与cvs数据——重复一个lisp
嗨,伙计们,我有一个制作很差的代码,我用它来创建一个钻孔,输入它的起始坐标,倾角,方位角和长度。(defun C:bno(/ line prof )
(setq rad (getreal "\nRadius: "))
(setq romp (getstring "\n Start coordinates X,Y,Z: "))
(setq incl (getstring "\n dip: "))
(setq azim (getreal "\n Azimuth: "))
(setq prof (getstring "\n depth: "))
(setq angul (+ (* azim -1.0 ) 90.0 ))
(setq direc (strcat "@" prof "lst ( str / pos )
(if (setq pos (vl-string-position 44 str))
(cons (substr str 1 pos) (_csv->lst (substr str (+ pos 2))))
(list str)
)
)
(setq fo (open "c:\\acadtemp\\bore.csv" "R"))
(setq lst '())
(while (setq nline (read-line fo))
(setq lst (cons (_csv->lst nline) lst))
)
(close fo)
看看第一次使用!地表温度 谢谢你的提示Bigal
这是或多或少也 非常简单
(setq id (nth 0 lst)
x (nth 1 lst)
y (nth 2 lst)
z (nth 3 lst)
)
(command "text" (list x y z) "" 0.0 id) ; this depends on you text style if height is set or not.
哦,是的,在开始时做一个伪(princ(读线)),读取标题,然后开始(while)(读线
完美!谢谢!
页:
[1]