ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
RVRobert Voogt09/06/2018

        Set swBom = swBomAnn.GetAnnotation

       

        For i = 0 To swBom.GetTextFormatCount - 1

            Set swTextFormat = swBom.GetTextFormat(i)

            swTextFormat.CharHeight = 0.008

            swTextFormat.Bold = False

            swTextFormat.Italic = False

            swTextFormat.TypeFaceName = "Calibri"

       

            boolstatus = swBomTable.SetTextFormat(i, False, swTextFormat)

Code runs without error, but it doesn't change the font. I assume I'm not assigning it correctly.

I also tried

boolstatus = swBomTable.SetColumnCustomProperty(i, swTextFormat)

I was also thinking of changing the Font of tables under document property before inserting my BOM by using:

boolstatus = swModel.Extension.SetUserPreferenceTextFormat(swUserPreferenceTextFormat_e.swDetailingTableTextFormat, swUserPreferenceOption_e.swDetailingNoOptionSpecified, <Value>)

But I have no idea what to enter under <value>.