Follow code can get TableAnnotations
Hope get quantity . see picture?
**************************************
Private Sub del20150121()
Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2, SwDraw As DrawingDoc
Set SwApp = Application.SldWorks
Set SwModel = SwApp.ActiveDoc
Set SwDraw = SwModel
Dim SwFeat As Feature
Set SwFeat = SwDraw.FeatureByName("HTable")
Dim hTable As HoleTable, SwTabAnn As TableAnnotation
Set hTable = SwFeat.GetSpecificFeature2
Stop
With hTable
Debug.Print .GetTableAnnotationCount
Set SwTabAnn = .GetTableAnnotations(0)
'''' How to get quantity in Hole Table?
End With
Stop
End Sub
SolidworksApi macros
Yong,
Simply traverse all cells in the hole table until you find the one with text equal to "Quantity", then get the cell directly below it.
You might also add "Option Compare Text" at the top of your code so that text comparison is always case-insensitive.
Keith
SolidWorks API Training