I need to determine if the there is enough room in a drawing to insert either a block or add a text note (MText).
Would anyone have advise on this or something to get me started..or is his to much work ?
Thanks in Advance.
Regards,
EddieS
|
I need to determine if the there is enough room in a drawing to insert either a block or add a text note (MText).
Would anyone have advise on this or something to get me started..or is his to much work ?
Thanks in Advance.
Regards,
EddieS
Thats easy. Ther's no need to check, because there is always enough room. A .dwg doesn't have limits if limits is turned off, so you can go on inserting text and blocks for a long time.
Perhaps that wasn't the answer you were looking for. Then check your question and rephrase more specifically plz.
When you say enough "ROOM" are you refering to enough space on the sheet or asking about a file size limitation or what? Either way, yes, it'll fit, just depends on how you want to show it (size, scale, etc). Like darfnuggi said, this might not answer your question but if you could be a little more specific maybe we can help.
OK...more specific..
What I am looking at doing is checking if there is enough space with in a titleblock area for the insertion of a block or Mtext.
The titleblock may or may NOT be exploded...so I would guess using the EXTMAX & EXTMIN to determine the titleblock, but finding a unused space in this area is what I am requiring.
Hope this clarifys my request.
Thanks for responding.
Regards,
EddieS
This is an intriguing request. I think it can be done.. And yes it is a lot of work. A couple of questions for you.
Is your title block in paper space or model space?
Would there be more than one layout tab per drawing?
Is the title block boundary (the lines that create the frame around the drawing) on a specific layer?
Would the new text/ block be placed in model or paperspace?
Jason,
Thanks from responding..to answer your questions..
The titleblock will be in modelspace, and on a specific layer..this will mean the drawing will have only the one layout..and that new block/metext is to inserted in the same space as the titleblock.
So you want the old titleblock to stay in the drawing, and you want to place a block of text or mtext inside that old titleblock. You want to do this without covering the old information in the block with the newly added info.
In my experience a company's titleblocks are pretty much all the same (perhaps one or two variants). The existant titleblocks usually have free space somewhere. If you are inserting the same text on all drawings (which makes sense because you want a program to do it), it would be more tidy to insert the text on the same spot on every drawing.
The titleblocks all have the same dimensions in bedit-space. Recently, I changed all the titleblocks of the company I work for by batch-scripting the process:
bedit; insert the text and logo; bclose;, etc.
Last edited by darfnuggi; 2008-10-29 at 07:08 AM.
If only it were that easy, these drawing are from outside sources, so it may be difficult to use specific co-ords for the insertion point...but if this going to prove to be a huge undertaking then it may be my only option.
I was hoping (in fact assumed) that some one may have already done something similar, and had code already written for it.
I’m working on a VB routine now (in my spare time). I think I’m close... I have a few more questions.
A block seems to be an easier solution than Mtest. Can we assume its a block?
Can I assume that the block will be the same size in all cases?
The basic premise is to determine the limits of the title block by isolating the objects on the title block layer. Insert the block in the lower left corner. Check to see if it intersects with other objects. if it does move the block incrementally right checking for overlap at each increment. Until it finds an open space, or until it reaches the right side of the title block. if no space is available it moves to the far left again moves up a small increment and starts again. if it moves through the entire title block than it gives you a message that no space is available.
If someone else can write this faster or has a better solution than me. Please jump in.