3 Replies Latest reply on Oct 24, 2018 6:45 PM by Artem Taturevych

    SetSuppression2() Not working

    Tom Sowers

      This is very confusing to me, I have a portion of a Macro that has been working fine for days to suppress and unsuppress components in an assembly.  I edited the assembly, just suppressed a few parts to make the assembly load time shorter since the macro will unsuppress them if they are needed.  Since then the macro is unable to unsuppress parts.  It can suppress parts perfectly fine and when calling SetSuppression2() it returns a value of 2 that the state was changed.  I've checked the component visibility and it is visible.  The part will unsuppress like normal if I click unsuppress in solidworks so the issue is isolated to the API call.  I just did a repair of the solidworks installation and uninstalled the APISDK and reinstalled it and I still have this issue.  Is there some setting in solidworks that can cause this?

       

      Below is a snip of some code I am using to test this.

        • Re: SetSuppression2() Not working
          Tom Sowers

          SelectByID2() and the EditUnsuppress2 works perfectly fine so the issue is specific to SetSuppression2().  I do see on the solidworks help page that this will not work while the property manager page is open.  I'm going to assume this is the issue? Does anyone know how to close this?