This will unsuppress all the mates in an assembly. I'm not really sure, but I'd guess it only affects the active configuration. Ken
'Copied from/Started with: 'Get Mates and Mate Entities Example (VB) 'This example shows how to traverse a FeatureManager design tree and get all of the assemblies mates and mate entities.
'---------------------------------------------- ' Preconditions: Assembly document is open. ' Postconditioins: None '
Option Explicit
Sub main() Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swFeat As SldWorks.feature Dim swMateFeat As SldWorks.feature Dim swSubFeat As SldWorks.feature Dim swMate As SldWorks.Mate2 Dim swComp As SldWorks.Component2 Dim swMateEnt(2) As SldWorks.MateEntity2 Dim i As Integer
' Disable Visual Basic error on implicit Query Interface On Error Resume Next
Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Set swFeat = swModel.FirstFeature
' Iterate over features in FeatureManager design tree Do While Not swFeat Is Nothing If "MateGroup" = swFeat.GetTypeName Then Set swMateFeat = swFeat ' Get first mate, which is a subfeature Set swSubFeat = swMateFeat.GetFirstSubFeature Do While Not swSubFeat Is Nothing Set swMate = swSubFeat.GetSpecificFeature2
If Not swMate Is Nothing Then ' Debug.Print swSubFeat.Name swModel.SelectByID swSubFeat.Name, "MATE", 0, 0, 0 swModel.SelectedFeatureProperties 0, 0, 0, 0, 0,
0, 0, 1, 0, swSubFeat.Name swModel.ClearSelection End If
' Get the next mate in MateGroup Set swSubFeat = swSubFeat.GetNextSubFeature Loop End If Set swFeat = swFeat.GetNextFeature Loop End Sub