Check in the solid bodies folder as Andy suggested. You can also Shift+TAB in the environment, Shift+TAB is “Show hidden” where the mouse is hovering.
You could also right click on the feature and click on the eye so that it shows whatever the feature is attached to, if the issue is that it was hidden.
The first several times it happened to me I was totally lost! Now I use the “Tab” & “Shift Tab” to hide/unhide things all that time just because I can!
Thank You! I have been looking for that for some time. I normally would go through my feature tree looking at my absorbed sketches looking for sketches that didn’t have bodies showing! On my smaller parts that wasn’t a big issue but on large multibody parts it could take awhile.
I found a macro for assemblies that unhides everything with 1 button click. I was hoping to find a macro that did the same for multi-body parts.
'**********************
'Copyright(C) 2023 Xarial Pty Limited
'Reference: https://www.codestack.net/solidworks-api/document/assembly/components/show-with-dependents/
'License: https://www.codestack.net/license/
'**********************
Private Declare PtrSafe Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Dim swApp As SldWorks.SldWorks
Sub main()
Set swApp = Application.SldWorks
Dim swAssy As SldWorks.AssemblyDoc
Set swAssy = swApp.ActiveDoc
If Not swAssy Is Nothing Then
Dim swComp As SldWorks.Component2
Set swComp = swAssy.SelectionManager.GetSelectedObjectsComponent3(1, -1)
If swComp Is Nothing Then
Set swComp = swAssy.ConfigurationManager.ActiveConfiguration.GetRootComponent3(False)
End If
ShowWithDependents swComp
Else
MsgBox "Please open assembly"
End If
End Sub
Sub ShowWithDependents(comp As SldWorks.Component2)
comp.Select4 False, Nothing, False
Const WM_COMMAND As Long = &H111
Const SHOW_WITH_DEPENDENTS_CMD As Long = 33227
Dim swFrame As SldWorks.Frame
Set swFrame = swApp.Frame
SendMessage swFrame.GetHWnd(), WM_COMMAND, SHOW_WITH_DEPENDENTS_CMD, 0
End Sub
I found this macro on the old solidworks forum. I don’t know who to give the credit to, the post says the author is “Solidworks Forums” A big thanks to whoever wrote it.
Dim swApp As Object
Dim model As ModelDoc2
Dim part As PartDoc
Dim BodyArr As Variant
Dim swBody As Body2
Sub main()
Set swApp = Application.SldWorks
Set model = swApp.ActiveDoc
Set part = model
BodyArr = part.GetBodies2(-1, False)
Dim Cnt As Integer
For Cnt = 0 To UBound(BodyArr)
Set swBody = BodyArr(Cnt)
If Not swBody Is Nothing Then
swBody.HideBody (False)
End If
Next Cnt
End Sub