Write a SOLIDWORKS VBA macro for SOLIDWORKS 2024 that reads the mass properties of the active part: mass in kilograms, volume in cubic centimetres, surface area in square centimetres and the centre of mass in millimetres. It must use the material assigned to the part, take the units correctly no matter what the document units are, and show the results in a message box with 3 decimals. Stop with a message if no part is open or no material is assigned. Use early binding and check every return value. Give me only the complete macro and one sentence on how to run it.
