Author Topic: MTEXT/TEXT "tables" CONVERT TO A TABLE AND THEN EXPORT TO EXCEL  (Read 4126 times)

0 Members and 1 Guest are viewing this topic.

gisdude

  • Newt
  • Posts: 23
Hi all,
At the risk of posting on a topic that has been posted on...I have several dozen drawings that have wiring schedules that are mtext and text - not a table per se. Some of them are even OLE objects created from a table in 1998 or so - those tables have been gone. That's not the most pressing thing.  I have been searching for a lisp routine that will take ONLY the "table" text/mtext entities and put them in an AUTOCAD table for eventual export to EXCEL. I have looked and look but have not seen anything that is what I need.

I've tried the DATAEXTRACTION tool in AUTOCAD, but that takes EVERY OBJECT, i.e., point, lines, whatever. I only need the contents in the wiring schedule.

If anyone has any LISP routine that I could modify...I'm still searching on all the internets, but I'm pessimistic.

Thanks all,

jvillarreal

  • Bull Frog
  • Posts: 332
Re: MTEXT/TEXT "tables" CONVERT TO A TABLE AND THEN EXPORT TO EXCEL
« Reply #1 on: March 12, 2019, 04:26:07 PM »
Heres one for text to csv:
https://www.theswamp.org/index.php?topic=34628.0



if the table happens to also include grid lines, you could use this:
https://www.theswamp.org/index.php?topic=35884.msg591350#msg591350

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: MTEXT/TEXT "tables" CONVERT TO A TABLE AND THEN EXPORT TO EXCEL
« Reply #2 on: March 12, 2019, 04:54:35 PM »
I have been searching for a lisp routine that will take ONLY the "table" text/mtext entities and put them in an AUTOCAD table for eventual export to EXCEL.
I have looked and look but have not seen anything that is what I need.

Probably my SS->SortedMatrixL would help one for the first half of the routine, also Lee's Unformat String might be needed.
Although the lack of an sample drawing provides risk of failure on the potentially suggested program's algorithm.
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg