I have a while loop that im using to prompt the user to select a face so that a sketch may be started on it.
everything works fine (Im able to spin the model around and make selections) when testing it in the vb editor but when I run it from within soldiworks using the "Run Macro" button I cannot spin the model around nor make selections. essentially SW locks up and the only way out is to end the process.
is there something wrong with the loop im using or the way im connecting to solidworks?
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim swSelMgr As SldWorks.SelectionMgr
Const SelectedObjectCount = 1
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
'Select the face to verify macro is workiing
boolstatus = Part.Extension.SelectByID2("", "FACE", 0.304800000000057, 0.151591133586805, -3.67656190501293E-02, False, 0, Nothing, 0)
Set swSelMgr = Part.SelectionManager
MsgBox "Select a Face to to start a sketch on, then click OK."
'Wait while user selects a face and clicks OK
While swSelMgr.GetSelectedObjectCount < SelectedObjectCount
thank you in advance for the help