Author Topic: Truely Table Export  (Read 8167 times)

0 Members and 1 Guest are viewing this topic.

xiaxiang

  • Guest
Truely Table Export
« on: June 15, 2012, 04:36:54 AM »
Long time  I did not come to the forum
First say "Hi !" to all.
I have a question and I can not solve it .
I will post a table with line and text entity in one dwg drawing,
and a excel table which has been dealed with the software "TableBuilder" ,
this website http://www.cadig.com/products/tablebuilder.php
How can I use autolisp to Process this drawing?
I want that the content , format of the Table can be exported,
the same as the table in the dwg drawings.
Copy another lisp code to here ,from the author Fixo, forums augi.
this website ,15#
http://forums.augi.com/showthread.php?136467-lisp-table-help/page2
 :-)
Distress for a long time
Seems  cannot solve the problem using lisp.
 :-)
Many Thanks.




« Last Edit: June 15, 2012, 04:55:52 AM by xiaxiang »

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Truely Table Export
« Reply #1 on: June 15, 2012, 08:58:19 AM »
That's going to be an incredibly painful task ... that "table" is no table. It's lines and text, so the lisp will have to sort through which text goes in what row/column by somehow figuring out from the xy position. But then there's "joined" cells (especially in the heading), so it's no simple task at all.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

xiaxiang

  • Guest
Re: Truely Table Export
« Reply #2 on: June 15, 2012, 09:46:45 AM »
That's going to be an incredibly painful task ... that "table" is no table. It's lines and text, so the lisp will have to sort through which text goes in what row/column by somehow figuring out from the xy position. But then there's "joined" cells (especially in the heading), so it's no simple task at all.

Yes,I agree.
To Merge cells is very hard for Judgment and Determin.
Thanks for reply,irneb
How about your Caddons software?
You helped much more with Auto Increment suit in the Augi forum...
Many thanks

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Truely Table Export
« Reply #3 on: June 15, 2012, 11:45:12 AM »
Glad you liked it, I wish I could snip off some time to fix some of the bugs / add requests.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: Truely Table Export
« Reply #4 on: June 18, 2012, 04:11:23 AM »
Thanks for sharing

jvillarreal

  • Bull Frog
  • Posts: 332
Re: Truely Table Export
« Reply #5 on: June 19, 2012, 06:14:46 PM »
I had time today to work on a q&d solution for your plain table to csv routine..It should at least be a good start as its currently incompatible with blocks. Its my convert old table routine, implementing code from fixo's table export routine.

As the merge method used requires that all text be deleted, I cheated by simply performing an undo to replace the text at the end.  :-o

Hope you can use it for your final routine.

xiaxiang

  • Guest
Re: Truely Table Export
« Reply #6 on: June 20, 2012, 09:50:22 AM »
I had time today to work on a q&d solution for your plain table to csv routine..It should at least be a good start as its currently incompatible with blocks. Its my convert old table routine, implementing code from fixo's table export routine.

As the merge method used requires that all text be deleted, I cheated by simply performing an undo to replace the text at the end.  :-o

Hope you can use it for your final routine.
Sorry for late.
Thanks for your routine,Juan!
I will post my own code tomorrow because some minor matters still exit,for an example,I still failed when bring the color of
the cad text entity to excel text.Others are correct.
My code is stolen from you and fixo. :lmao:
I think that it will be better when using redraw function to hide the text than delete them and undo.
And,I still cannot understand the meaning of two variables, hmergelist and vmergelist ,such as this list ((0 7 0 6) (0 3 0 2)),
can you explain them in detail?
Next I hope that it will be compatible with blocks.
Your code is a wonderful answer for this topic,Juan,Thanks!

M-dub

  • Guest
Re: Truely Table Export
« Reply #7 on: June 20, 2012, 10:42:34 AM »

xiaxiang

  • Guest
Re: Truely Table Export
« Reply #8 on: June 20, 2012, 10:55:56 AM »
Have a look at T.Willey's ExportTextTable
http://www.theswamp.org/index.php?topic=24792.msg298916#msg298916
Thanks for reply.Serious study of that post :-D

jvillarreal

  • Bull Frog
  • Posts: 332
Re: Truely Table Export
« Reply #9 on: June 20, 2012, 11:01:36 AM »
You're welcome
I'm not sure that using redraw will prevent object selection but let me know how it goes.
(0 7 0 6) = Horizontal merge, merge row 0 column 7 with row 0 column 6
Here's the same routine with minor changes to be compatible with blocks.

*Edit*
I needed to re-localize the hmergelist and vmergelist variables.
« Last Edit: June 20, 2012, 05:38:20 PM by jvillarreal »

xiaxiang

  • Guest
Re: Truely Table Export
« Reply #10 on: June 21, 2012, 05:49:37 AM »
You're welcome

OK,post my code here.
There is no rigorous test,and it's not compatible with blocks.
but whick kind of blocks would it be compatible with?
I'm not certain.
 Thanks:-)

jvillarreal

  • Bull Frog
  • Posts: 332
Re: Truely Table Export
« Reply #11 on: June 21, 2012, 03:26:26 PM »
OK,post my code here.
Nicely done xiaxiang.
There is no rigorous test,
FYI: Although it's probably just an issue between the program versions we're using, some of the colors exported to excel are off.
Using AutoCAD 2010 and 2011, Excel 2007: Blue->Red, Red->Blue, many others->red or Magenta
..it's not compatible with blocks.
but whick kind of blocks would it be compatible with?
I'm not certain.
Blocks should probably be exported as they are when using AutoCAD's "tableexport".

The next step could be to add cell rotation/orientation and border color.

Thanks for taking time to put this together. It'll help me export our Microstation quantity tables  :| to excel.

xiaxiang

  • Guest
Re: Truely Table Export
« Reply #12 on: June 24, 2012, 10:03:53 AM »
Sorry for this lately reply for the reason of holiday,Juan
 :|
I will think about seriously what you have suggested to me.
The stuff will be updated in next version.
Always cannot sit down alone for programming.
Thanks for your help,Juan!

xiaxiang

  • Guest
Re: Truely Table Export
« Reply #13 on: June 27, 2012, 11:53:47 PM »
« Last Edit: June 28, 2012, 02:22:33 AM by xiaxiang »

je_cusi

  • Mosquito
  • Posts: 1
Re: Truely Table Export
« Reply #14 on: August 20, 2012, 09:14:04 AM »
Thanks for sharing!!!