Dim Part As ModelDoc2 Dim myPart As PartDoc Dim myCutlist As BodyFolder Dim myFeature As Feature
Set swapp = Application.SldWorks Set Part = swapp.ActiveDoc If Part Is Nothing Then Exit Sub If Part.GetType <> 1 Then Exit Sub
Set myPart = Part Set selMgr = Part.SelectionManager If myPart.IsWeldment = False Then Exit Sub Set myFeature = myPart.FeatureByName("Solid Bodies") Set myCutlist = myFeature.GetSpecificFeature2 myCutlist.UpdateCutList
Non, même avec le nom français, ca ne marche pas. Du coup j'ai refais une macro de recherche du dossier CutList avec ton premier lien.
Là ca marche au top, merci
____________________________________
Sub maj() While Not swFeat Is Nothing If swFeat.GetTypeName2 = "SolidBodyFolder" Then Dim swBodyFolder As SldWorks.BodyFolder Set swBodyFolder = swFeat.GetSpecificFeature2 swBodyFolder.UpdateCutList End If Set swFeat = swFeat.GetNextFeature Wend End Sub