AnsweredAssumed Answered

How to get a count of Configurations in Part/Assembly?

Question asked by Shuhei Kazuma on Sep 27, 2018
Latest reply on Sep 27, 2018 by Shuhei Kazuma

Dear experts,

 

I would like to get the count of configurations given the Part or Assembly files. How can I do it? I use C# but any example is appreciated.

 

Background:

I want to write a code which modifies a global variable. But I need to use different methods depending on the number of configurations existing in the file.

 

For example, if a part has multiple configurations, then I have to use

 

swEqnMgr.SetEquationAndConfigurationOption(index, NewEquation, (int)swInConfigurationOpts_e.sw,null);

 

However, for a part with a single configuration, then

 

swEqnMgr.Equation[index] = NewEquation

 

 

thank you in advance!

SK

Outcomes