3 Replies Latest reply on Feb 13, 2015 2:30 PM by Keith Rice

    events handle

    Yang Hu

      Hello, all. I'm a student, and I'm trying to make a tool to help people to learn how to use Solidworks creating models. Is there a way that the macro can get the information about what button the learner clicks, such as sketch button, feature button, extrude button, etc.

       

      Thank you.

        • Re: events handle
          Keith Rice

          Yang,

           

          There would be no easy way to do this. At best you could use OnIdleNotify to wait until something occurs, and then write code that investigates the selection that just occurred, but this would be a very time-consuming endeavor.

           

          The best way to record what the user is doing is to use the macro recorder.

           

          Why do you need to know what buttons the user clicks?

           

          Keith

          SolidWorks API Tutorials

            • Re: events handle
              Yang Hu

              Hi Keith,

               

              I want to make an AI agent to teach people using Solidworks to make 3D model. Like the agent can interrupt people if it found a mistake happened during the sketching process. Therefore, I want to know is there any way to detect which button the user clicked and let the agent to figure out whether the clicked button is correct one.

               

              Yang

            • Re: events handle
              Keith Rice

              I see. That would be very difficult to program, unfortunately. A simpler approach would be to wait until the user has created a body feature and then verify that the mass properties are correct.

               

              Keith

              SolidWorks API Training