I don't remember how to do it. It's an ASM in another bigger ASM. It must be said that I don't use solidworks intensely anymore This is the message that comes up when I want to insert something
I have a little macro to offer you: => It allows you to identify the first document in a recovery state encountered (to be restarted several times if other occurrences occur).
Dim swApp As SldWorks.SldWorks 'Objet principal de l’application SolidWorks
Dim swDoc As SldWorks.ModelDoc2 'Objet de type document (pièce, assemblage, mise en plan…)
Dim swFeat As Feature 'Objet représentant une fonction (feature) dans l’arbre
Dim sList As String 'Chaîne de caractères pour stocker les informations
Sub main()
'Connexion à l’instance de SolidWorks
Set swApp = Application.SldWorks
'Récupère le premier document ouvert dans SolidWorks
Set swDoc = swApp.GetFirstDocument
'Initialise la chaîne vide
sList = ""
FileName = ""
'Boucle sur tous les documents ouverts
While Not swDoc Is Nothing
'Récupère la première fonction en partant du bas de l’arbre des fonctions
Set swFeat = swDoc.FeatureByPositionReverse(0)
'Teste si le document est "en reprise" (rollback mode)
If (swFeat.IsRolledBack = True) Then
'Ajoute le chemin complet du document à la liste
sList = sList & vbCrLf & swDoc.GetPathName
'Récupère uniquement le nom du fichier avec extension
FileName = swDoc.GetTitle
'Stop 'Instr de debug (pause)
End If
'Passe au document suivant ouvert
Set swDoc = swDoc.GetNext
Wend
If FileName = "" Then FileName = "Pas de Documents trouvé."
'Affiche un message avec le dernier document trouvé en reprise
MsgBox "Document en état de Reprise: " & vbCrLf & FileName
End Sub
Note: In Solidworks 2022, it is possible to restore this state as soon as the assembly is opened:
In the end, I had used a bestial method before your excellent answers
1°) I created a totally empty ASM 2°) I had in a second window in which I had the recalcitrant ASM 3°) I took the subsets one by one from the second window to the empty ASM until the message appeared. Then I opened the recalcitrant s/s asm and I moved each piece to the empty ASM and I made a small minor modification on a dimension and I resumed in the recalcitrant sub ASM and boom the pb disappeared. As a precaution, I quarantined the recalcitrant sub-asm and took an old version of the sub-asm and rendered them identical to the one quarantined. Since then, it has been working properly. Whew
So thank you again for your help! I keep a copy in word of your answers.