TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: gisdude on March 12, 2019, 04:11:58 PM

Title: MTEXT/TEXT "tables" CONVERT TO A TABLE AND THEN EXPORT TO EXCEL
Post by: gisdude on March 12, 2019, 04:11:58 PM
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,
Title: Re: MTEXT/TEXT "tables" CONVERT TO A TABLE AND THEN EXPORT TO EXCEL
Post by: jvillarreal 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
Title: Re: MTEXT/TEXT "tables" CONVERT TO A TABLE AND THEN EXPORT TO EXCEL
Post by: Grrr1337 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 (https://www.cadtutor.net/forum/topic/63343-switching-two-items-in-a-table-in-autocad-lisp/?tab=comments#comment-522608) would help one for the first half of the routine, also Lee's Unformat String (http://www.lee-mac.com/unformatstring.html) might be needed.
Although the lack of an sample drawing provides risk of failure on the potentially suggested program's algorithm.