2 Replies Latest reply on Feb 25, 2014 2:35 AM by Pierre Vergneault

    How to open mate manager

    Pierre Vergneault

      Is There a Way to open the mate manager without creating a mate? (AddMate3??????)

      I would like my macro to open the mate manager and fill with the selected entities. The macro would then stop and let the user validate the settings or modify it.


      By the Way, is There a VBA command that closes the mate manager?



        • Re: How to open mate manager
          Artem Taturevych

          Check this example:


          Dim swApp As SldWorks.SldWorks

          Dim swAssy As SldWorks.AssemblyDoc

          Dim swFeat As SldWorks.Feature


          Sub main()


              Set swApp = Application.SldWorks


              Set swAssy = swApp.ActiveDoc


              Set swFeat = swAssy.FeatureByName("Front Plane")


              'Select entities for mates

              swFeat.Select2 False, 0


              'Open mates manager

              swApp.RunCommand swCommands_Addedit_Mate, ""




              'Apply mate

              swApp.RunCommand swCommands_PmOK, ""


              'Close PM

              swApp.RunCommand swCommands_PmCancel, ""


          End Sub