I am having no luck getting FeatureByName to work properly for cut lists. C++, COM and VB all return NULL or Nothing.
Dim swApp As SldWorks.SldWorks
Dim mDoc As ModelDoc2
Dim pDoc As PartDoc
Dim feat As Feature
Dim folder As BodyFolder
Sub main()
Set swApp = Application.SldWorks
Set mDoc = swApp.ActiveDoc
Set pDoc = mDoc
Set feat = pDoc.FeatureByName("Cut list")
Set folder = feat.GetSpecificFeature2
Debug.Print folder.Type
End Sub
I've tried all different variations such as "Cut List", "Cut list", "Cut list(1)" to no avail. Works great for othe folder types (solid bodies, surface bodies, sub folders, etc). Just not for cut lists.
Jim S.
SolidworksApi macros