6 Replies Latest reply on Sep 3, 2015 11:45 AM by Bruce Perry

    I have renamed a configuration in and assembly. I created a derived configuration. Now I want to make my parent configuration my active configuration. Just can't get there from the derived configuration?

    Bruce Perry

      I tried a number of thing. Most of them commented out, ended up using the name to activate the configuration.

      I am using SW2011.

      There should be a way to get to the parent configuration from the derived configuration even if it means, just moving back up the ladder?


      'Sets the active configuration to the named title

      'MyConfigurationName = swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name

      'swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name = swApp.ActiveDoc.GetTitle() & " - Open"


      Debug.Print swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name


      'Rename Active Configuration

      swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name = swApp.ActiveDoc.GetTitle() & " - Open"   ', "", "", 1, swConf.Name, swApp.ActiveDoc.GetTitle())

                                                                      '(swApp.ActiveDoc.GetTitle() + " - Closed", "", "", 1, swConf.Name, swApp.ActiveDoc.GetTitle())

      'Get Active Configuration

      Set swConfig = swModel.GetConfigurationByName(swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name)


      MyConfigurationName = swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name


      Debug.Print "My Config :" & MyConfigurationName


      'Set swDerivConf = swConfMgr.AddConfiguration(swConf.Name + " Config Name Addition", "Configuration Comment", "User Specified Name BOM", 1, swConf.Name[Parent Configuration], "Configuration Description")


      'Add a Derived Configuration

      Set swDerivConf = swConfMgr.AddConfiguration(swApp.ActiveDoc.GetTitle() + " - Closed", "", "", 1, swConfig.Name, swApp.ActiveDoc.GetTitle())


      swModel.ShowConfiguration2 (MyConfigurationName)


      Debug.Print swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name


      End Sub