2 Replies Latest reply on Sep 26, 2013 6:22 PM by Anshul Pandeys

    Mate Selection from mate object

    Anshul Pandeys

      Hi all,

       

      I was wondering how can i select a mate from Mate2 that gets returned as a  part of AddMate3() call. This returned mate gets suppressed & for my assembly i always wanted this to be in unsupressed state.

       

      Anshul

        • Re: Mate Selection from mate object
          Keith Rice

          Hi Anshul,

           

          It is hard to tell what you're asking. Are you asking how to select a mate or how to unsuppress a mate? If you want to select a mate, use IModelDocExtension::SelectByID2. If you want to unsupress a mate, use IFeature::SetSuppression2.

           

          Keith

          SolidWorks API Training

            • Re: Mate Selection from mate object
              Anshul Pandeys

              Keith,

              Apologies if the question wasn't clear enough. My use case is following.

               

              I am trying to  add Top plane mates to two components at a distance( the two components have Right and Front mates already ) .

               

              Unfortunately after adding the top plane mates between the two components, the resulting mates is coming out as suppressed. So I was just trying to unsupress this mate forcefully via EditUnsupress.

               

              In order to select this Mate by SelectByID2 methods, I am looking for the selection string on this mate, so that I can select the mate and call EditSuppress on ModelDoc2 Object for the selected component. I can't find  anything on mate object that I can use to select this object

               

              Hence the post to find out how to select the mate once you have mate2 object

               

               

              Anshul