I was wondering about an automated feature of the software that I don't understand the use of.
In a drawing, I can have multiple sheets like in this image.
If I put a new view in one of the sheets, all the sheets automatically expand in the feature manager, as in the image below.
I'm constantly forced to right-click > gather. I have a hard time understanding what this feature brings as an advantage, and I would like to know if it is possible to disable it because I can't find much about it in the options.
It's comfort of use, nothing serious, it's not a blocking problem, but I'm curious to have the feedback of other people.
Same behavior, I imagine it's to allow you to drag a view from one sheet to another more easily. But nothing found to block this behavior which can indeed be annoying when you make drawings with many sheets (which is not my case!)
Indeed, I often work with plan files that sometimes include several dozen plans (with us we call these flow plans, these are the plans of the unit parts to be machined internally)
After all this time, I have a solution to propose. That's what I wanted to offer at the time, but I didn't have the right order to put it all together. Thanks to @sbadenis I have it now, the credit goes to him in large part. My only merit is that I have not forgotten you.
Here is the macro that creates a new sheet and then gathers (folds) the entire tree:
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
swApp.RunCommand swCommands_e.swCommands_Insert_Sheet, ""
swApp.RunCommand swCommands_Collapseallitems_Tree, ""
End Sub