Get BOM of sldasm with images

Hello, I am looking for a code where I can get the BOM table of a sldasm file with the images of the materials. I would appreciate it so much if somebody can help me with the code.

SolidworksApi macros