How can you access the center of mass of body inside Discovery or SpaceClaim?
The center of mass is stored in the MassProperties of a body and can be accessed via the PricipleAxes.Origin.
Also, there is a MeasureHelper function to directly get the center of mass from a selection. This can be helpful if you need the combined center of mass of multiple bodies.
for body in bodies: