Macro for calculation of Moment of inertia

Can anybody help me for finding out the moment of inertia (at o/p co-ordiante system) with a macro.

Artem has given me  the  code for that

swMass.SetCoordinateSystem swModel.Extension.GetCoordinateSystemTransformByName ("YourCoordSystemName")

But when i pasted that code in the macro, and running it's not working.

can you help me out

SolidworksApi macros