To figure this out for a load, open up a bls in notepad and read through it.
A line for a brick looks something like.. 64x64 Base" -64 84 0.1 0 1 50 0 0 1 1 1
So.. make a new file object, loop through the file until you come across a line that starts with Linecount, After that, check that strPos(%line, "\"") >= 0, if this is true, getWord(getSubStr(%line, (%pos=strPos(%line,"\"")+1),strLen(%line)-%pos), 3) to get the height of the brick.
In a server, loop through mainBrickGroup to get the individual brick groups. Loop through the individual brick groups and check for the highest brick with isPlanted == true.