I am trying to find the inertia of a particular instance of a part in an assembly. I can not use GetMassProperties or CreateMassProperty because those both access the part's modelDoc and will output the same mass properties regardless of the instance. My plan was to get the Mass Moment about the part's center of mass and then measure the distance between the origin of the assembly and the origin of a particular part instance and used parallel axis theorem. However, this requires that the coordinate system of the part model doc is the same as the coordinate system of the assembly so that the axes are actually parallel. Can anybody help me devise a method to check and change every part's model doc coordinate system if it does not align with the assembly coordinate system?

Regards,

Patrick

I found this SolidWorks help article that might be helpful:

2015 SOLIDWORKS Help - Creating a Coordinate System

Apparently you can create a coordinate system using reference geometry and get information from the "Mass Property" dialog relative to that coordinate system. I am not sure exactly how to go about this with API commands, but this should be a pretty good starting point.