How to get the solving status of the part component in the assembly?

According to the API documentation, the property Solving::IComponent2 only applies to subassembly components, not part components. If you try to get the Solve as option of a part component, this property returns -1.

Is there any other method to get the solving status (rigid or flexible) for part components?

Source: Solving::IComponent2

How about, API mentors?:
@Gupta9665
@AmenJlili
@BigCrazyAl
@PeterBrinkhuis

The rigid or flexible option is only available for sub assemblies, and not for parts. So there would be no API to get this for Parts. What is you end goal? Are you looking to get the flexible parts, and remove the state of flexible parts?

I'm running a batch toggle command that excludes part/subassembly from BOM and another one that sets as envelope. It's a two state command: 1) If there's no selection, then it shows (by selection) all components set as excluded from BOM. 2) It toggles the exclusion state for pre selected components. For changing the envelope state the method CompConfigProperties6::IAssemblyDoc demands the parameter for solving state.

2 Answers

2

You can use swComponent.IsEnvelope method to get the envelope state of the component (assy or part).

And solving state is to change between flexible or rigid for sub assemblies only. Use this parameter only if you want to change the state of an sub assembly, else you can leave it empty for the parts.

It’s possible to have part components set as flexible but there’s no any method to get its solving state… :dizzy_face:

I think API is not yet available for this.