If you have a block with a polyline in it, you can use nentsel to select the object within the block, then use the area command in the lisp and calculate it that way.
Are you trying to create, learn or program any of these? It'd be nice to see where you're at so we know how and where to help you.