API WTF of the Day

SW2010 SP 2.0 Windows Vista x64

The CombineBodiesFeatureData object exhibits some bad behavior when setting the list of bodies to combine.  If you have two bodies in an existing Combine feature, and then edit the definition to add a third body, a subsequent call to retrieve the bodies has one too many.  The first body from the original feature is repeated twice.  This smells like an off-by-one error, which isn't surprising since the API is very inconsistent on 0 vs. 1 based indexing for various methods.  Sample part and macro attached.

Jim S.

SolidworksApi macros