- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(defun C:ATTRIB_EXTRACT ( / EXTRACT_e EXTRACT_c EXTRACT_list )
(setq EXTRACT_e (car (entsel)))
;;; Loop through all the entities and...
(while (and EXTRACT_e (/= "SEQEND" (cdr (assoc 0 (entget EXTRACT_e)))))
(setq EXTRACT_c (entget EXTRACT_e))
;;; ...extract the ATTRIB information required
(if (= (cdr (assoc 0 EXTRACT_c)) "ATTRIB")
(setq EXTRACT_list (cons
(list
(cdr (assoc 2 EXTRACT_c)); attribute tag name ;
(cdr (assoc 1 EXTRACT_c)); attribute value ;
)
EXTRACT_list
)
)
)
(setq EXTRACT_e (entnext EXTRACT_e))
)
EXTRACT_list
)
Hello Community,
I found this lisp routine (not sure where but, thanks to whom ever wrote it) that extracts the attribute data from a block.
I simply want to add in a script to write the list to a csv or text file. Any help would be appreciated and thank you in advance.
Solved! Go to Solution.