An image of what you're asking about would be helpful, with a description of the steps the User would take. Call the command, pick a Block, and see its distance from the nearest wall? Or from the nearest other object of any kind? If a wall, is that a wall object that knows it's a wall, such as in AutoCAD Architecture, or just a Line? Report the distance at the command line, or draw an actual Dimension object showing it? See its distance from the nearest other Block? Any Block? Or just the nearest of the same name? If Blocks are involved, would the distance be to or from their insertion points, or any part of them? Etc., etc.
Or am I completely misunderstanding the intent?
Kent Cooper, AIA