Wow looking at the prices in that last link Dean gave, I might think about starting to bottle some of the hundreds of macro's I've got laying around gathering dust, see if I can sell a few
It took a bit of effort but I have it working, using the same principle of inserting a block, that has a polyline and a linked field, it then joins that polyline into your hatch boundary and reads the area of the polyline, after that it hatches that object.
Place the attached dwg in your support path or insert it as a block into a working drawing (anywhere out of the way - it's not important and you can delete it if you want because the block definition will be in the drawing)
Here's the macro to run it,
*^C^C^C-la;m;area;;rea;id;end;\change;end;$M=$(getvar,lastpoint);;p;la;area;;explode;end;$(getvar,lastpoint);-insert;*area2;end;$(getvar,lastpoint);1;0;-la;f;done;;pe;l;j;all;;;-la;t;done;;trim;end;$(getvar,lastpoint);;mid;$(+,50,$(index,0,$(getvar,lastpoint))),$(index,1,$(getvar,lastpoint));;-hatch;p;ansi37;;;s;p;;;
When you run the macro you will see A question mark appear at the cursor, pick a point on the hatch polyline boundary, and the area field appears and the boundary is hatched.
The following are just a few notes for things that may or may not cause some issues - macros don't really allow for error trapping. And if you find it doesn't work as expected then it could be for one of these reasons. Posting an example drawing would help and if you get errors then a copy of the command line history will help as well.
The size of units in your drawing will probably mean that a few thing will need changing to suit your needs - the block uses a polyline of 100 units and because Autocad macros are affected by zoom level, when you use macro's, if you are drawing objects at hundreds of unit sizes it should be fine but as that increases to hundreds of thousands then the block and macro may need updating (I often use a zoom function to solve this but it does drive you mad watching the screen flicker all over the place).
Because it uses coordinates based on the first point you pick, then it needs you to pick a point on the right hand side of a closed polyline, and there should be nothing to the right of that point for an area of about 100 units.
As I mentioned earlier it's impossible to foresee problems without knowing all the possible things in your drawing. A programming language like Lisp allows you to very precisely select objects, and use error trapping and get feedback from a user. A macro is basically a method to string a known and predictable sequence of commands together (and is limited in the length of the string it will accept)