Page 1 of 1

Making “Default” config identical to one other existing config

Posted: Fri Jul 30, 2021 4:24 pm
by bnemec
Hello,
I am working on a tool to help us dissolve some of our configured part files into files, each with one config. So instead of having n part numbers in 1 file we’ll be back to having 1 part number per 1 file.

I have not done much with configurations and I’m trying to find how to more or less copy a derived config back to the Default config. Or edit the Default config to be identical to a specific derived config. I think I’m looking for it in all the wrong places, I don’t even have a start. I'm getting the feeling that what I'm trying to do goes against the normal configuration operations.

Re: Making “Default” config identical to one other existing config

Posted: Mon Aug 02, 2021 3:51 pm
by JSculley
If you were doing this manually, you would have to activate the derived config, add a new config with a different name than 'Default', delete the 'Default' config and then rename the new config to Default.

Re: Making “Default” config identical to one other existing config

Posted: Tue Aug 03, 2021 1:13 pm
by bnemec
JSculley wrote: Mon Aug 02, 2021 3:51 pm If you were doing this manually, you would have to activate the derived config, add a new config with a different name than 'Default', delete the 'Default' config and then rename the new config to Default.

<()>
that's way too simple. I'm going to spend a couple more days trying to figure out a more elaborate way of doing this.

What you said to do written in C#, fast and simple:

Code: Select all

      swModel.AddConfiguration3("_Default", configNameToKeep, "", 0);

      swModel.DeleteConfiguration2("Default");

      Configuration c = swModel.GetConfigurationByName("_Default");
      c.Name = "Default";
Thank you.