For the longest time, I’ve been telling people that Civil 3D labels will always scale. When they ask if you can create a label where the text doesn’t scale (not sure why you would want that but that’s beside the point) I’ve always replied no, C3D labels always scale. Well, today I got to thinking about it and I’ve come up with a way to make the text in your labels always be the same size in your drawing and not scale up and down to a constant plotting height. Read on to find out how.
So, here’s an example. In the image below I have two viewports at different scales. One of the labels is a typical label (text scales so it always plots the same height) and the other has been modified so it doesn’t scale with the drawing scale (always the same size in the model):
As you can see, the spot elevation 149.661 will plot two different heights. How is this done you may ask yourself? Well, you probably wouldn’t ever come back to my blog if I didn’t tell you now would you. The secret here is to use expressions. Basically, the expression will take the height (in the model) of the text you want and divide it by the drawing scale. In this example, I wanted the text to be 50′ tall, so my expression looks like this:
The “Drawing Scale Conversion” is the current drawing scale or viewport scale the label is being displayed in and is available in the properties for most of the expressions (possibly all of them but I’m not willing to make that kind of commitment without actually checking them all). To use this expression in your label, simply add it to the height of your text.
Now it’s time to think even further outside the box. This can also be used to control the length of lines in your label. For example, I was trying to come up with a way to label fire hydrants and have it put a line from the hydrant to the water line (actually an alignment). The plotted length of the line will change based on the scale of the drawing so this is where this whole idea started. The length of the line needs to be the same as the offset distance for the label location. Well, I created a line component and used an expression for the length of the line. The expression looks like this:
The offset distance is a property available in the expression. Add this expression to the length of the line and it will always be drawn from the label point to the alignment (assuming it’s set up correctly and there is a valid offset).
I combined these concepts together and created a hydrant station/offset label style. Within it are two blocks, a line, and text. The line always draws to the alignment, the two blocks are always the same size, the valve is always the same distance from the alignment, and the text changes size with the scales. Here it is in two different viewports at two different scales:
If you would like a copy of this label style with it’s associated expressions, click HERE to download it from my Dropbox account. If for some reason the link doesn’t work, leave a comment here with your e-mail address and I’ll send it to you. Don’t worry, I won’t spam you and your e-mail won’t be visible to anyone.