Jump to content

Automatic block sizing to length of text


Recommended Posts

Posted

Alright, this is my first thread, so be gentle. I will start by letting everyone know that I have no idea how to write a lisp routine. That is why I am here. I know there has got to be a better way of doing this. So far I have been unsuccessful finding anyone who can figure this out:

 

I work for a mechanical contractor and we use a block for giving the elevation of our piping. I would like to be able to select an object in my drawing (a piece of pipe drawn by a vertical application called CAD-Mech) and from that drag a leader with the center line elevation of the pipe inside my block. And that's not it. After the center line elevation is inserted into the block, I would like the block to automatically size according to how long the text is with some preset margins.

 

Am I crazy thinking this can be done? Check out my block for an idea of what I would like to accomplish.

CL Elevation Bubble.dwg

  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

  • ksperopoulos

    12

  • Lee Mac

    11

  • dbroada

    1

  • wdudley

    1

Posted

Hello and welcome to the forums - we hope you'll like it here.

 

Firstly, would you be kind enough to upload your file in 2000 format please :) as those of us with earlier versions can't view it to help :)

 

Thanks

 

Lee

Posted

I would say it sounds feasible but since Lee is on the case I'll run away - he is far better with LISP than I am and so much faster too. :)

 

Hello and welcome to the forums - we hope you'll like it here.

 

Firstly, would you be kind enough to upload your file in 2000 format please :) as those of us with earlier versions can't view it to help :)

 

Thanks

 

Lee

Lee, its about time you downloaded AutoDesk's free TrueConvert :lol: then you can save things to whatever version you like - although you obviously won't have the benefit of newer things like dynamic blocks and annotative text.
Posted

Would it be difficult to make this into an annotative tool? We are solely using annotative text and dimensions and would probably need the versatility the annotative objects have. I have tried using my block in a multileader that was annotative, but I lose the dynamic properties I made for the block when I do this.

Posted

That is quite a task I must say...

 

the posted drawing is just a block, so I am assuming that you would like the block "inserted" into the drawing at a certain point, with the text in the middle being the height of your pipe, and the spacing being re-sized accordingly.

 

What may be easier is to either use a dynamic block to achieve similar results, or to use LISP to "draw" the block each time, hence resizing for the text accordingly.

Posted

Lee, its about time you downloaded AutoDesk's free TrueConvert :lol: then you can save things to whatever version you like - although you obviously won't have the benefit of newer things like dynamic blocks and annotative text.

 

Thanks Dave for this pointer - I must say it is sometimes annoying using '04 and not having some of the other capabilities.... but then I feel "at home" on '04 :)

Posted

I know it is a big task, but like I said before, there has got to be an easier way of doing this. Right now I insert the block into the drawing. Then I double click on the block and manually type the elevation of my 3d pipe that I have drawn in my model. From there, I flip the leader to the side I need it to be on and then resize the "bubble" around the text. And finally, if I have to modify it from there, I can stretch the leader. After I do all of this, I copy this block to the next location and repeat the process all over again. And believe me, there is a lot of these throughout a drawing.

 

I don't necessarily have to keep this block. It is what I have created to accomplish what I need to do. I have a lot of these types of blocks for elevations (top of pipe, bottom of pipe, invert elevation, etc.) as well as blocks for numbering pre-fabricated pipe and fittings. I thought that if I could find a lisp for making this a one-step process it would make my life a whole lot easier.

 

I hope I am explaining myself clearly. Let me know if I am not. I know a lot of people aren't in my field and this might be an unusual request.

Posted

By the way, forgot to ask - would you be able to upload a sample drawing showing the kind of thing this label would be applied to, just so I can get an idea of how to select things etc.

 

Thanks

 

Lee

Posted

Lee Mac, having a little trouble uploading the file. I guess it is too large. Got another way to get this to you?

Posted

I would only need one small example of maybe one pipe of how it would be used. - just so I can see how the pipes are contructed etc

 

If you can't upload it send me an email with it to leebob3@hotmail.com

Posted

I have tried to take a look at the drawing, but I think this would be a task better left to those with access to later versions of ACAD.

 

I am not sure why the file is so large though - must be a complicated pipe setup! :P

Posted

Thanks for trying. Do you think that it can be done though? I know that within the piping program they have a method of labeling pipe sizes, elevations, prefabricated pieces, etc., but the leaders don't stay attached to the text or blocks I have created very well and the "bubble" we use doesn't automatically size around the text. A very powerful program, but their annotation tools are lacking. I would even settle right now for a block that I had to manually type the elevation in, just as long as the "bubble" wrapped the text like I want. Because I think I could use it in a multileader.

 

FYI - I forgot to tell you that the attribute to get the elevation of the pipe is "FMID". There are others for the different types of elevations I want, but baby steps - right?

Posted

I do think it can be done - especially the resizing of the bubble - (just using a "getBoundingBox" command for the text).

 

But is the pipe itself a block? with an attribute for the elevation?

 

I'm just wondering how I can get the elevation of the pipe :P

Posted

From what I know, the pipe and fittings are surfaces. Not sure how true that is - just what I have been told.

 

Through the software's annotation tools, we can put our own block (i.e. the bubble with the CL symbol for center line). The instructions say to use "FMID" for the tag in an attribute in order to automatically extract the elevation out of the pipe and into the block. Does that make any sense?

Posted

From what you have explained, it seems that an attribute with tag FMID can be extracted from the pipe to retrieve the elevation - am I somewhere near the mark?

Posted

But, I must say, I have never dealt with "surfaces" before, so this may be quite a challenge...

Posted

Yes, that is exactly right.

Posted

Lee Mac,

 

Have you had any luck with this?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...