mechanate
Mechanical
- Mar 18, 2010
- 16
Hey guys, this is spun off another thread that I started over in the SolidWorks forum, though I'm not sure this is the exact correct place to ask this question. I'm currently developing a macro within SolidWorks and have run into a slight irritant. It seems that SolidWorks orders configuration numbers based on when they were created, not what order they appear in within the program. Anyway, I'm retrieving the list of configurations within SolidWorks with the following little bit of code
This places a list of strings within ConfigList, each one being the name of a configuration. This is done so I can later reference these names and attach them to a page in a GUI. These names are retrieved based on the order they were created though. Is there a way to take this list and then alphabetize the string array so that they appear in alphabetical order? I want to alphabetize it so that the correct name shows up on the correct page number according to the order SolidWorks shows the configurations. Pardon me if this is a little confusing, I'm still rather new to this whole VBA and object oriented language thing.
Code:
ConfigList = swDoc.GetConfigurationNames()
This places a list of strings within ConfigList, each one being the name of a configuration. This is done so I can later reference these names and attach them to a page in a GUI. These names are retrieved based on the order they were created though. Is there a way to take this list and then alphabetize the string array so that they appear in alphabetical order? I want to alphabetize it so that the correct name shows up on the correct page number according to the order SolidWorks shows the configurations. Pardon me if this is a little confusing, I'm still rather new to this whole VBA and object oriented language thing.