Message 1 of 3
I'm looking for a Lisp to create excel drawing list from drawing attributes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking for a routine that will export data from specific attributes to create a list on a single excel sheet. As an example I've attached a sample cad file and what I'm trying to get on an excel file.
It's been many moons since I wrote any code, i have an old rotine I wrote years ago but I keep getting an error message.- ; error: no function definition: DXF
My old routine,
(defun c:ext ()
(setq file (open "c:\\attrib.CSV" "a")
i -1
)
; (setq file (open "c:\\attrib.CSV" "a")i -1)
(setq OTB (ssget "x" '((2 . "30x42"))))
(if (/= OTB nil)
(setq EN (entget (ssname OTB 0)))
(alert "30x42 not found")
)
(setq EN (entget (ssname OTB 0)))
(repeat 50
(setq en (entget (entnext (dxf -1 en))))
(setq at1 (cdr (assoc 1 en)))
(setq at2 (cdr (assoc 2 en)))
(if (= at2 "BLDGN")
(setq BLDGN at1)
);---
(if (= at2 "DWGTITLE")
(setq DWGTITLE at1)
);---
(if (= at2 "ERNUM")
(setq ERNUM at1)
);---
(if (= at2 "CNTL")
(setq CNTL at1)
);---
(if (= at2 "TEMPID")
(setq TEMPID at1)
);---
)
(setq SPACE " ")
(setq strin
(strcat SPACE "," BLDGN " , " ERNUM " , " TEMPID " , " DWGTITLE " , " SPACE "," SPACE "," SPACE " , " (getvar "dwgname") "," CNTL))
(WRITE-LINE strin file)
(close file)
(princ)
)
;|«Visual LISP© Format Options»
;(130 2 40 2 nil "end of " 90 9 0 0 1 T T nil T)
;*** DO NOT add text below the comment! ***|;