Insertion point based on the numbers of rows of a BOM

Hello,

     I'm trying to modify a MACRO that places notes on drawings.

     Currently the insertion point must be selected for the MACRO to run.

     I want to set the insertion point right above the Bill Of Materials, but I'm having difficulties defining it.

     Can somebody help?

     I need to find the BOM within the drawing and then count the number o rows on it.

SolidworksApi macros