Unfortunately you won't be able to just select the face and get the bounding box relatieve to it. You need to build the transformation matrix of this face to transform your box. Take a look at IMathUtility interface and math transforms.
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
Thanks for the reply. With the simple bounding box code I have now, if I select the weldment cut list folder that contains the pipe I am adding a bounding box to and the face I want to use as a reference, then run the macro, it inserts a bounding box with that face automatically as a reference.
Is there any way to select a face of a pipe automatically only having the cut list folder selected?
Are there any links between the body feature and the cut list item that can be accessed within VBA?
Got it to work! Using DoEvents, the macro is paused until the user makes a selection, then adds the subweldfolder to the same selection list before creating the bounding box. The result is a bounding box with the selected face as a reference.
MsgBox "Select Face for Bounding Box Reference"
While swSelMgr.GetSelectedObjectCount < 1
swSelMgr.GetSelectedObject6 1, 0
'add cutlist folder to new selection list
swModel.Extension.SelectByID2 swCutlistItem.Name, "SUBWELDFOLDER", 0, 0, 0, True, 0, Nothing, 0