AnsweredAssumed Answered

no way back with thisConfig.HideNewComponentModels

Question asked by Andreas Beck on Feb 2, 2018
Latest reply on Feb 6, 2018 by Andreas Beck

Hello,

this is my simplified code and the problem is with assemblies:

 

Dim swApp           As SldWorks.SldWorks

Dim swModel         As SldWorks.ModelDoc2

Dim thisConfig      As SldWorks.Configuration

Dim ConfigNames     As Variant

Dim KonfigName      As String

Dim value           As Boolean

Dim i               As Integer

 

Private Sub CommandButton1_Click()

    Set swApp = CreateObject("SldWorks.Application")

    Set swModel = swApp.ActiveDoc

    ConfigCount = swModel.GetConfigurationCount

    ConfigNames = swModel.GetConfigurationNames

 

    For i = 0 To (ConfigCount - 1)

        KonfigName = ConfigNames(i)

        Set thisConfig = swModel.GetConfigurationByName(KonfigName)

 

        If CheckBox3.value = True Then

            thisConfig.HideNewComponentModels = True

        Else

            thisConfig.HideNewComponentModels = False     

       End If

   Next i

  value = swModel.EditRebuild3()

End Sub

 

If thisConfig.HideNewComponentModels is set to True, then the checkmark is set correctly.

You can see this in the Properties of Display State Properties.

 

If thisConfig.HideNewComponentModels is set to False, the checkmark will not be reset.

Why, is this a Bug?

 

Greetings, Andi

Outcomes