Use this example and modify for your needs. It found the cut-list folders by type name under the folder feature:
Application Engineer at Intercad
Tel: +61 2 9454 4444
I actaully used this code earlier, but i trashed it. It kept returing the body count on the SolidBodyFolder as 0 but it would return the CutListFolder as 37 which is correct. I may mess with that again tommorow and see if i have any luck.
Have you updated your cut-list folder?
The problem with a lot of API Help examples is that they cover WAY beyond what you need to know, making it a chore to dissect them. Our Macro Library contains a much shorter example that clearly shows how to traverse cut lists. It is called "Get weldment profile and cut list custom properties". Modifying that code, here's what I think you need:
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swFeat As SldWorks.Feature
Dim intCount As Integer
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swFeat = swModel.FirstFeature
intCount = 0
While Not swFeat Is Nothing
If swFeat.GetTypeName = "CutListFolder" Then
intCount = intCount + 1
Set swFeat = swFeat.GetNextFeature
swApp.SendMsgToUser intCount & " folders in the solid bodies folder."
yes this code will be tons easier to incorporate than the code from solidworks api help. Thank you.
Would you be intrested in an Add-In that automates some weldments-related processes (Cut-List export, DXF creation, Relative to Model drawings automation)?
Let me know if you want more information.