Author Topic: Setting text size in a code generated AcadTable object  (Read 4307 times)

0 Members and 1 Guest are viewing this topic.

pjm8765

  • Guest
Setting text size in a code generated AcadTable object
« on: May 15, 2017, 07:12:42 AM »
I've tried the SetCellTextHeight function, but it hasn't set the text height.  Have tried it before and after the call to SetText:

Code: [Select]
            Dim tblRefAnc As AcadTable = myDocuments.ThisDrawing.ModelSpace.AddTable(insPt, 2, 10, 175, 6120 / 10)
            ' titles
            tblRefAnc.SetColumnWidth(0, 900)
            tblRefAnc.SetColumnWidth(1, 500)
            tblRefAnc.SetColumnWidth(2, 436)

            tblRefAnc.MergeCells(0, 0, 0, 9)
            tblRefAnc.SetCellAlignment(0, 0, AcCellAlignment.acMiddleLeft)

            tblRefAnc.SetText(0, 0, "Ancillaries Supplied")
            tblRefAnc.SetCellTextHeight(0, 0, 16)

I've looked at the Autodesk help for the SetCellFormat method which would be useful if there was an explanation of how the format strings are themselves formatted.

Can someone point me in the right direction please.





pjm8765

  • Guest
Re: Setting text size in a code generated AcadTable object
« Reply #1 on: May 19, 2017, 05:45:40 AM »
Apologies, I've just spotted the code that was setting the row and cell text height after the code that I had added.  Have made the modifications that I need now.