Creating Program or Macro to display material cost of part

I would like to be able to use the mass and or volumeinformation in SW to calculate and display the material cost of apart after I put in the material cost per mass or per volume. Is itpossible? Where is a good place to start?SolidworksApi macros