I've been programming a macro that would select the first feature in my Cut-list folder and then create a 3D Bounding Box for the selected item.
From what I've gathered from online resources, here is my (maybe 100th) attempt at the macro.
I'm struggling with the cut-list-item selection part. Some sources I viewed online demonstrates how to select Solid Bodies, but not cut-list item IDs. Perhaps I'm over complicating things?
Help much appreciated.
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim modDocExt As SldWorks.ModelDocExtension
Dim boolstatus As Boolean
Dim swfeat As Feature
Dim CutItem As String
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set modDocExt = Part.Extension
' Traverse FeatureManager design tree
' Get first feature in FeatureManager design tree
swfeat = Part.FirstFeature
'Get ID of first feature
CutItem = swfeat.GetID
' Once body selected, create a bounding box
boolstatus = modDocExt.SelectByID2(CutItem, "SUBWELDFOLDER", 0, 0, 0, False, 0, Nothing, 0)