5 Replies Latest reply on Jul 11, 2016 8:09 PM by Edwin Thompson

    WithEvents not working?

    Edwin Thompson

      I have some 2012 VB.net code that worked fine.  However, it doesn't seem to be working now... any ideas what the problem is?

      The working parts of the code are shown below.  When an entity is selected on a SW model part, the msrcPartDoc function is never called.

      Any ideas why not?


      Friend Class Form1

          Inherits System.Windows.Forms.Form

          Dim WithEvents msrcPartDoc As SldWorks.PartDoc


          Private Function msrcPartDoc_NewSelectionNotify() As Integer

              'Capture & process mouse strokes msrcAssemblyDoc


         End Sub


      End Class


      I really appreciate any suggestions.