cart: empty [ Login ]

Problem with table breaks

1 
bill
1/7/2019 5:43 PM
There's a problem with CadLib thinking that a table has Table Breaks enabled if, in AutoCAD, you turn on Table Breaks for the table and then turn them off again. As a result, when I add rows to the table and save the file, breaks get turned on for the table when they shouldn't be. To reproduce this: 1. Create a new drawing in AutoCAD and add a table, without Table Breaks enabled (this is the default). 2. Add a second table to the drawing. For this table, change Table Breaks to enabled, then back to not enabled. 3. Read the drawing in CadLib and look at the BreakData properties for the tables For the first table, HasData==false, and Flags==0. For the second table, HasData==true and Flags==1. If you now save the drawing from CadLib and open it in AutoCAD, the second table has table breaks enabled. I've attached the drawing file that I used.
Wout
1/8/2019 2:10 PM
Hi Bill, I've just released a new CadLib version with a bug fix. You can download it from your user profile, there should be a link that you can follow under "Your resources". Thank you for the report! - Wout
bill
1/8/2019 7:59 PM
That seems to be working. Is there a property now that indicates whether table breaks are enabled? Everything looks the same as it did before, property-wise.
Wout
1/8/2019 8:50 PM
Yes, the table breaks enabled flag can be checked by (DxfTable.BreakData.OptionFlags & TableBreakOptionFlags.EnableBreaks) != 0. - Wout
bill
1/8/2019 8:56 PM
Right, sorry--I was looking at Flags instead of OptionFlags.
Wout
1/8/2019 8:58 PM
Well, you were kinda right, because the bug was caused by the Flags being written where OptionFlags should have been written. - Wout
1