1 Reply Latest reply on Aug 10, 2015 3:59 AM by Aleksandr Hohlatsov

    Traverse Configuration → EditUnsuppress

    Yong Ning



      Traverse Configuration

      vSheets = SwModel.GetConfigurationNames



      Traverse Configuration → select Feature →  EditUnsuppress


      Hope other methor ?






      Private Sub ll1()

         Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

            Set SwApp = Application.SldWorks

            Set SwModel = SwApp.ActiveDoc

         Dim vSheets, SwConf As Configuration

            vSheets = SwModel.GetConfigurationNames


         Dim SwFeat As Feature, SwSubFeat As Feature

         For ii = 0 To UBound(vSheets)

            'Set SwConf = SwModel.GetConfigurationByName(vSheets(ii))

            SwModel.ShowConfiguration2 vSheets(ii)

            Set SwFeat = SwModel.FirstFeature

            Do While Not SwFeat Is Nothing

               If SwFeat.GetTypeName = "MateGroup" Then

                   Set SwSubFeat = SwFeat.GetFirstSubFeature

                   'Debug.Print SwFeat.Name, SwFeat.GetTypeName,

                   Do While Not SwSubFeat Is Nothing

                      With SwSubFeat

                         Debug.Print .Name, .GetTypeName

                         .Select True

                      End With


                      Set SwSubFeat = SwSubFeat.GetNextSubFeature





               End If

               Set SwFeat = SwFeat.GetNextFeature


         Next ii

      End Sub