AnsweredAssumed Answered

In Title Block table →Why GetSpecificFeature is nothing???

Question asked by Yong Ning on Oct 20, 2014
Latest reply on Oct 20, 2014 by Yong Ning

00.jpg

'' In Bom, follow code → Set SwBomFeat = SwFeat.GetSpecificFeature → is True

 

Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

Dim SwFeat As Feature, Str

Private Sub ll1()

    Set SwApp = Application.SldWorks

    Set SwModel = SwApp.ActiveDoc

    Str = "Bill Of Materials3"

    Set SwFeat = SwModel.FeatureByName(Str)

  Dim SwBomFeat As BomFeature, SwAnn As TableAnnotation, Tmp

    Set SwBomFeat = SwFeat.GetSpecificFeature

    Tmp = SwBomFeat.GetTableAnnotations

    Set SwAnn = Tmp(0)

    With SwAnn

       Debug.Print .Title, .RowCount, .ColumnCount

    End With

 

End Sub

********************************

Question

 

 

01.jpg

 

Set SwTitleFeat = SwFeat.GetSpecificFeature → is Nothing ??????????????

 

Private Sub ll2()

    Set SwApp = Application.SldWorks

    Set SwModel = SwApp.ActiveDoc

    Str = "Title Block Table2"

    Set SwFeat = SwModel.FeatureByName(Str)

  Dim SwTitleFeat As TitleBlockTableFeature, SwAnn As TableAnnotation, Tmp

    Set SwTitleFeat = SwFeat.GetSpecificFeature

    Tmp = SwTitleFeat.GetTableAnnotations

    Set SwAnn = Tmp(0)

    With SwAnn

       Debug.Print .Title, .RowCount, .ColumnCount

    End With

End Sub

 

Why ??

 

Set SwTitleFeat = SwFeat.GetSpecificFeature → is Nothing

Attachments

Outcomes