I am trying to get all revision table data from our drawings to get it into a database. Sadly from a lot of drawings I get a lot of missing values and even duplicated values.
A piece of test code:
//Open the file, do not allow ReadOnly for testing purposes
SwDMDocument17 swDoc = (SwDMDocument17)dmDocMgr.GetDocument(file, SwDmDocumentType.swDmDocumentDrawing, false, out OpenError);
//Get all table names
string tableNames = (string)swDoc.GetTableNames(SwDmTableType.swDmTableTypeRevision);
//Since there is only one (checked), just use the first table name
dmTable = (SwDMTable4)swDoc.GetTable(tableNames);
//Load table content into array of strings, this is where it goes wrong but there is no error returned and the rows and columns match
string celltextarr = (string)dmTable.GetTableCellText(out tErrors, out rows, out columns);
I added two drawings,
PE07371 works as expected;
PE37336 returns empty cells and duplicated values
Somebody have any idea what could be the problem? Thanks in advance!
I did some more research and found out the problem: I use my own SW addin to create revision tables and did not define the table template. Never noticed any problems till now.
Retrieving data ...