In one of my macros, I would like to rearrange the folders in the tree structure.
I would like to move the "Screws" folder to the very end of the tree, and the "FI" folder just above the "Screws" folder.
Only if the folders have parts or assemblies between them as on the pictures the moved folders are not placed at the end.
Do you have an idea how to move these folders as desired?
Enclosed you will find the code and an example of how to assemble them.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swAssy As SldWorks.AssemblyDoc
Dim modelDocExt As SldWorks.ModelDocExtension
Dim bRet As Boolean
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swAssy = swModel
Set modelDocExt = swAssy.Extension
bRet = modelDocExt.ReorderFeature("FI", "", swMoveToEnd)
bRet = modelDocExt.ReorderFeature("Visserie", "", swMoveToEnd)