Solutions to Drawing Table Cell Padding Bug?

Programming and macros
User avatar
loeb
Posts: 46
Joined: Sun Jan 16, 2022 5:55 pm
Answers: 1
x 34
x 8

Solutions to Drawing Table Cell Padding Bug?

Unread post 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?
Post Reply