OcCad,
If the block is inserted in paper space, then you have to use ObjectDBX to get this information, but if it is inserted into model space no need to go the ObjectDBX route since all objects in model space are brought over in the xref. You just need to search the blocks definition for the block you want to check. This will make the program faster, and won't matter if anyone has the xref'ed drawing open.