Search the Community
Showing results for tags 'extraction'.
-
using -dataextraction to search current sheet
aggie_moose posted a topic in AutoLISP, Visual LISP & DCL
Hello all, I am attempting to extract a list of all blocks and their attributed text into excel (from which to build a BOM). Using the dataextraction commands works, but there are a lot of button clicks (aka places where users could get confused or click the wrong thing). I tried using -dataextraction, but for some reason using the command line version does not let me search for objects in the current drawing. Opening the extraction wizard confirms this - whenever I load a template, even if I selected "also search in current drawing" when making it, it's unchecked by default. Something like Lee Mac's program MacAtt might work, but it doesn't have a command line version. I've also tried using the code from this thread http://www.cadtutor.net/forum/showthread.php?50663-Data-Extraction but upon running it, I get "error: quit / exit abort" I'm thinking there is a way to do what I want through the "ATTEXT" command, but every time I try to use it, it says "0 records in extract file" and the output file is blank. Anyone have ideas about what else I can try?- 5 replies
-
- excel
- attributes
-
(and 1 more)
Tagged with:
-
Layer lineweight extraction into excel file error
kam1967 posted a topic in AutoLISP, Visual LISP & DCL
Hi. I am trying to extra layer data, including the lineweight onto an excel format. I added the lineweight information into the lisp routine, but I am definitely doing something wrong, as it continues to give me an error. Thank you in advance! Here is the routine that was modified to include the lineweight.. (defun c:LA2EXCEL (/ nm lnm llnm nam name opf ln lname color ltype lna lnamea colora ltypea,line_wt,description) ; ;I added line_wt in the line above ; (setq nm (getvar "dwgname")) (setq lnm (strlen nm)) (setq llnm (- lnm 3)) ;(setq lay_alst (entget (tblobjname "LAYER" "LAYER-NAME"))) ;(setq line_wt (cdr (assoc 370 lay_alst))) (setq lay_alst (entget (tblobjname "LAYER" "LAYER-NAME"))) ; ;I added this line below (setq line_wt (cdr (assoc 370 lay_alst))) ;I added this line above ; (setq nam (substr nm 1 llnm)) (setq name (strcat nam "csv")) (setq opf (open name "w")) (setq ln (tblnext "layer" T)) (setq lname (cdr (assoc 2 ln))) (setq color (cdr (assoc 62 ln))) (setq ltype (cdr (assoc 6 ln))) (setq stat (cdr (assoc 70 ln))) (cond ((= stat 1)(setq state "FROZEN")) ((= stat 2)(setq state "FROZEN IN NEW VPORT")) ((= stat 4)(setq state "LOCKED")) ((< color 0)(setq state "OFF")) ((>= color 0)(setq state "ON")) ) (write-line "Layer Name,Color,Linetype,Condition,Line_wt,Description" opf) (write-line (strcat lname "," (rtos (abs color) 2 0) "," ltype "," state) opf) (while (setq lna (tblnext "layer")) (setq lnamea (cdr (assoc 2 lna))) (setq colora (cdr (assoc 62 lna))) (setq ltypea (cdr (assoc 6 lna))) (setq stata (cdr (assoc 70 lna))) (cond ((= stata 1)(setq statea "FROZEN")) ((= stata 2)(setq statea "FROZEN IN NEW VPORT")) ((= stata 4)(setq statea "LOCKED")) ((< colora 0)(setq statea "OFF")) ((>= colora 0)(setq statea "ON")) ) (write-line (strcat lnamea "," (rtos (abs colora) 2 0) "," ltypea "," statea) opf) ) (close opf) (alert (strcat "File " name " created in current folder")) (princ) ) hanks!- 8 replies
-
- extraction
- excel format
-
(and 1 more)
Tagged with: