How to find the code for the function DRAWING: Create BOM?

Hello,

I would like to create the custom BOM table in DRAWING. Is it possible to look at the code which creates BOM tables? Can I find it in installed folders?

That command is implemented using the .NET and the code itself is not exposed.

Basically what it does is searching for the “DrawingTemplate” component.
Find all components that has the property “BOM” set to True
Creates balloon annotations for those components
Modify the template component (“Rows” property) to add quantities and names