AnsweredAssumed Answered

How to select  Suppression item, with SetSuppression2 command.

Question asked by Yong Ning on Jan 27, 2016
Latest reply on Jan 28, 2016 by Yong Ning

Follow key code  is  swComponentSuppressed, swAllConfiguration, ConfArr

code question , Result is ss2(0) = True,ss2(1) = True,ss2(2) = True,ss2(2) = True

 

Hope result → ss2(0) = True,ss2(1) = false,ss2(2) = false,ss2(2) = false

 

 

19.jpg

 

 

Private Sub ll2()

    Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

        Set SwApp = Application.SldWorks

        Set SwModel = SwApp.ActiveDoc

    Dim SwSelMgr As SelectionMgr

        Set SwSelMgr = SwModel.SelectionManager

    Dim ConfArr, SwConf As Configuration

        ConfArr = SwModel.GetConfigurationNames

    Dim SwFeat As Feature

        Set SwFeat = SwSelMgr.GetSelectedObject5(1)

        ss = SwFeat.IsSuppressed2(swAllConfiguration, ConfArr)

    ss1 = Array(True, False, False, False)

        SwFeat.SetSuppression2 swComponentSuppressed, swAllConfiguration, ConfArr

        ss2 = SwFeat.IsSuppressed2(2, ConfArr)

        Stop

        Debug.Print SwFeat.Name

End Sub

Attachments

Outcomes