Community Tip - You can change your system assigned username to something more personal in your community settings. X
When you change the format of an existing drawing with ProDrawingFormatAdd(), the tables of the old drawing format remain on the drawing.
Any ideas how I can get rid of them? I was thinking about using a drawing table visiting function and perhaps finding out what the parent of the table is?
Regards,
Jan
I got several answers (thanks) all giving the same solution: iterate through all the tables , call the function ProDwgtableIsFromFormat() to determine if the table should be deleted.
Now I run into a new problem: I use a table visiting function, but the command ProDwgtableDelete causes the visiting to stop after the first table has been deleted.
When I blank out the ProDwgtableDeletecommand I can notice in the debugger that then all tables are being visited.
I will now work around the problem by trying ProTablesCollect instead of the visiting function, but I was wondering if anybody had experienced the same problem.
Code:
err = ProDrawingTableVisit(dwgptr->drw, (ProDwgtableVisitAction) remove_table, NULL , (ProAppData) NULL);
..
ProError remove_table(ProDwgtable *table_ptr, ProError filter_status, ProAppData data)
{
..
err = ProDwgtableDelete(table_ptr, 1);
return(PRO_TK_NO_ERROR);
}