I had a thought about how to gather the extreme points of a polygon in a closed area simply by selecting a point within the area. It would work only when the area was a completely closed polygon, but it would be a neat trick.
Here is my thought....
Using the hatch command, create a hatch transparently to the user, make the scale sufficiently large so that it does not show on the screen. Grab that hatch and put it into a variable and extract the boundary from it. Store the boundary points in a list, then erase the hatch.
You should have a points diagram of the boundary of the room to begin aligning objects to.
If you use divide or measure, you could
first grab the last object using entlast then
conceivably insert your blocks aligned (don't worry about the attributes as of yet) then using the last entity from before, grab all entities using entnext from entlast.
Finally starting with the first block you inserted with the command, have the program add the attributes as needed to each individual block.
Heck the more I think about it the more I like it...
I know there is code around too that you could scalp and use for adding the attributes to a block, grabbing all entities from a specific point in the drawing database isn't really a difficult proposition either. Divide and Measure do the insertion hard work for you, and all you need to do is make sure the room is a closed area.
Damn what a good idea, I am just sorry I had not thought of it before you did....
Incedently it would work great for me with the placement of required electrical outlets, much faster....
I can see a pretty good use for this program.