Hi
This is my first post and I am untrained LISP user. I am currently using LISPfile to obtain spot levels from Auto CAD then open the file in Excel to calculate cutting and filling quantities. The coding is following.
(defun c:aaaa()
(setq ptu(getpoint "Enter Upper point :")
ptl(getpoint "Enter Lower point :")
ss_1(ssget "_C" ptu ptl)
ss_1(ssget "P" '((0 . "text")))
len (sslength ss_1)
cnt 0
f (open "ten04.txt" "a")
)
(while (>= len cnt)
(setq ent1 (ssname ss_1 cnt)
ent2 (entget ent1)
ent3 (assoc 1 ent2)
ent3 (cdr ent3)
)
(write-line ent3 f)
(setq cnt (1+ cnt))
)
(close f)
(princ)
)
Since in this file I ave used two points so I use Excel to repeat my command to obtain data quickly the excel file codes are as follows
aaaa
378102575.75,2624684164.103 378127575.75,2624709164.103
aaaa
378127575.75,2624684164.103 378152575.75,2624709164.103
aaaa
378152575.75,2624684164.103 378177575.75,2624709164.103
aaaa
378177575.75,2624684164.103 378202575.75,2624709164.103
aaaa
378202575.75,2624684164.103 378227575.75,2624709164.103
aaaa
378227575.75,2624684164.103 378252575.75,2624709164.103
please help me to modify this file
forum-use.dwg