Insert new row in the BOM Table - SolidWorks API (SolidWorks 2024)

 I could be able to create new BOM table and called below function in Macro -swp file.

MacroSolidworks api 

Sub InsertEmptyRow(swBOMTable As SldWorks.BomTableAnnotation, rowIndex As Long, numRows As Long)
Dim i As Integer
Dim swannotationtable As TableAnnotation
swannotationtable = swBOMTable
    For i = 1 To numRows
        swannotationtable.InsertRow rowIndex, numRows
    Next i
End Sub

 

Macro executes without any error and when I rebuild in drawing file, unable to see the new row.

Kindly suggest what could have gone wrong & share alternate API to reflect new empty row.