I am trying to create a folder in an assembly and the create a sub-folder in that folder. How do I add a subfolder into a folder
Dim swApp As SldWorks.SldWorks
Dim swModel As modelDoc2
Dim SWAsm As SldWorks.assemblyDoc
Dim FeatMgr As SldWorks.FeatureManager
Dim SWFeat2 As SldWorks.feature
Set swApp = CreateObject("SldWorks.Application")
Set swModel = swApp.ActiveDoc
Set SWAsm = swModel
Set FeatMgr = swModel.FeatureManager
Set SWFeat2 = FeatMgr.InsertFeatureTreeFolder2(1)
SWFeat2.Name = "Hi"
'Add subfolder to created folder
I think you can create sub folders first (using swFeatureTreeFolder_EmptyBefore) and then select all of them to and add them to new folder (using swFeatureTreeFolder_Containing).
Retrieving data ...