Page 1 of 1

Solutions to Drawing Table Cell Padding Bug?

Posted: Sun Mar 26, 2023 12:16 pm
by loeb
When creating new tables, cell padding often ends up being set to something different from what's specified in document properties. Often one or both of the padding values will be 0 (zero) instead of the non-zero value I specify (such as 0.02 in). I have tried writing VBA code to programatically se the padding such as:

Code: Select all

BoolStatus = ModelDocExtension.SetUserPreferenceDouble(swDetailingTablesVerticalPadding, swDetailingNoOptionSpecified, VerticalCellPadding * 0.0254)
BoolStatus = ModelDocExtension.SetUserPreferenceDouble(swDetailingTablesHorizontalPadding, swDetailingNoOptionSpecified, HorizontalCellPadding * 0.0254)
where VerticalCellPadding or HorizontalCellPadding are 0.02
but SolidWorks seems to ignore this as well. While I have lots of other code that successfully manipulates table attributes and values, I have found no methods to successfully programatically change the cell padding. I have found a lot of SPRs regarding this issue, going way back. Has anyone found a VBA work around?