Making “Default” config identical to one other existing config

Programming and macros
User avatar
bnemec
Posts: 1865
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2458
x 1339

Making “Default” config identical to one other existing config

Unread post 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.
by JSculley » 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.
Go to full post
User avatar
JSculley
Posts: 586
Joined: Tue May 04, 2021 7:28 am
Answers: 54
x 7
x 821

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

Unread post 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.
User avatar
bnemec
Posts: 1865
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2458
x 1339

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

Unread post 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.
Post Reply