Looking for Syntax to link part quantity from BOM to a block.

I am searching for the syntax that I can enter into a block and will reference the quantity in the BOM of a part. Does anyone know the proper syntax to achieve this? I currently have the File name(\$PRPVIEW:"SW-File Name", Material, and configuration name and I want to add the quantity to pull the quantity from the BOM so I dont have to hand enter it for every part and possibly have a typo. Any help would be appreciated. Thanks.

SolidworksApi macros