Currently we are in the process of converting our material BOM on our
drawings into Excel. But right now we have old drawings in our system
that have a hand typed BOM on the prints. Does anyone have or know of
either a Lisp routine or a program that will allow the export of text
data in any form out of autocad & then from there we can import this
information into either Excel or Lotus? I would greatly appreciate any
help you can give here.
Also attached is a sample Jpg of what some of our BOM's look like.
Thank you for your time & have a great day.
Dean A. Weldy
CAD Manager / Designer
16441 CR 38
Fax: (501) 423-3552
Work: (219) 642-4888
> Currently we are in the process of converting our material BOM on our
> drawings into Excel. But right now we have old drawings in our system
> that have a hand typed BOM on the prints. Does anyone have or know of
> either a Lisp routine or a program that will allow the export of text
> data in any form out of autocad & then from there we can import this
> information into either Excel or Lotus?
ToolPac 5.0 from http://www.dotsoft.com contains several Text Export
routines. Export text in the order selected or simply window off the
text and choose the 'topdown' option. The most elaborate routine allows
you to simply window off a table of text in the drawing, BOM's for
example. It determines the number and order of the rows/columns of text
objects automatically and exports the information to a comma delimited
file that can be opened up directly in Excel.
The code below will export a rectangular array of text
to a CSV file that you can import directly into Excel.
;; CSVOUT.LSP Copyright 2000 Tony Tanzillo All rights reserved.
;; Adds CSVOUT command to AutoCAD, which exports selected
;; tablular text to .CSV format.
(defun list-index (input func / i)
(setq i -1)
(cons val (setq i (1+ i)))
'(lambda (a b)
(apply func (mapcar 'car (list a b)))
(defun C:CSVOUT ( / ss indices oldtext epsilon colcnt rowcnt count j e tmp y table outfile
(defun text-point (ename / d)
(if (eq 2 (cdr (assoc 72 (setq d (entget ename)))))
(cdr (assoc 11 d))
(cdr (assoc 10 d))
(setq epsilon (/ (getvar "TEXTSIZE") 20.0))
(setq ss (ssget '((0 . "TEXT"))))
(if (or (not ss) (< (sslength ss) 2))
(alert "Must select a rectangular array of text.")
(setq indices (ss-index ss 'text-point 'compare-points))
(setq colcnt 0)
(setq y (caddr (assoc 10 (entget (ssname ss (car indices))))))
(while (equal y (caddr (assoc 10 (entget (ssname ss (nth (setq colcnt (1+ colcnt))
(if (zerop colcnt)
(progn (alert "\nNo columns detected.") (exit))
(setq count (length indices))
(if (not (zerop (rem count colcnt)))
"\nTotal number of text items (" (itoa count) ") must be an even "
"\nmultiple of the number of detected columns ("
(itoa colcnt) ")"