TurboCAD Forums

SDK Corner => Sample SDK Projects => SDK General Discussion => Topic started by: MatVic on July 08, 2013, 02:47:30 PM

Title: Reading table from DWG
Post by: MatVic on July 08, 2013, 02:47:30 PM
Hello everyone,
I'm new of this forum and I need your help.
I'm developing an application using TurboCad SDK and I need to read the rows of a table of a DWG file.
Scrolling all the objects in my DWG I found the Table object but I don't know how to read the content of its rows.
I found some Properties of that object that seem connected to the table, such as $TABLE_ROWS. I get a SafeArray with some values that I don't understand how to use.

I use TurboCad 17 SDK and my application is developed using MFC in Visual Studio 2010.

Thank you in advance
Title: Re: Reading table from DWG
Post by: MatVic on July 09, 2013, 09:19:56 AM
I tried this solution that it is enough in my case:
if you explode the graphic Table, you can get the Graphics contained in it. I search the object "Multiline text" and then I read the MTText property in order to get the text of the cell.
It isn't a beatiful way to work with table (I would have prefered a specific structure), but it works.
The graphics are in order (first the graphics of the first row, then the ones of the second row and so on). In this way, knowing the number of columns, you are able to know when start a new row and in what column you are.

Hello everyone,
I'm new of this forum and I need your help.
I'm developing an application using TurboCad SDK and I need to read the rows of a table of a DWG file.
Scrolling all the objects in my DWG I found the Table object but I don't know how to read the content of its rows.
I found some Properties of that object that seem connected to the table, such as $TABLE_ROWS. I get a SafeArray with some values that I don't understand how to use.

I use TurboCad 17 SDK and my application is developed using MFC in Visual Studio 2010.

Thank you in advance