How do I make a macro that adds equations?

I need a macro that will add the following equations to a part. The macro must also work for assemblies.

"Surface area [cm²]"= "SW-SurfaceArea" / 100

"Volume [cm³]"= "SW-Volume" / 1000

"Mass [kg]"= "SW-Mass" / 1000

Any help with this is highly appreciated.

SolidworksApi macros