Custom Property API Merge help/advise req!

Hi guys, im new to Api and looking for some advice.

What i need to do is Come up with a way of Merging Solidworks Properties and possibly filter them?

Im not sure of the best way to go about it.

Requirement,

To merge properties from different levels of and assembly into a single line either on the drawing line, the assembly line, or a new line (possibly)

If i have a assembly shown below, is there any way to merge the results, it either needs to be done when checking in the Assembly in PDM.

Or i could wait until i do a Full BOM export of all our parts. in CSV then in excel/access or something?

Table 1 is how it is now (kind of??) and table 2 is how i need it. but it needs to be able to filer out any "place keepers" ie N/A or something.

TreeCustom property 1Custom property 2Custom property 3Custom Property 4
Assembly450
-Drawing
--Part1150
--Part2200
--Part3300


TreeCustom property 1Custom property 2Custom property 3Custom Property 4
Assembly150200300450
-Drawing
--Part1150
--Part2200
--Part3300
SolidworksApi macros