I'm trying to remove a face from a preselected group of faces, but for some reason, I can't get deselect to work.
Here is a section of code that I'm working on. Basically I have a part with more than one face selected, and I want to remove the second selection from the list.
When I run this, I get a return of FALSE from the DeSelect2 call. Am I missing something?
Sub DeSelectFace()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFace As SldWorks.Face2
Dim swSelData As SldWorks.SelectData
Dim boolStatus As Boolean
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swSelData = swSelMgr.CreateSelectData
'Set the selected face
Set swFace = swSelMgr.GetSelectedObject6(1, -1)
'Remove face from selection
boolStatus = swSelMgr.DeSelect2(2, -1)
Debug.Print boolStatus
End Sub