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, leave a comment on this post using a valid e-mail address (don’t worry, I won’t spam you and your e-mail won’t be publicly visible). If you don’t want your comment posted, just say so and I won’t approve it.
p.s. During the writing of this post, I was drinking one of the best beers around, New Belgian Brewery’s Mothership Wit. If you like beer, I highly recommend it!





March 25, 2010 at 2:16 pm
Pretty nifty trick. i would love a copy of that style. That will save me a ton of time.
Thanks,
Mark
April 5, 2010 at 11:45 am
That would be a great label to have. Already trying to think of some other ways to use this tip.
Thanks
April 19, 2010 at 6:54 am
Nice, thank You. This trick with expresion builder helped me a lot with my printing problem. Before this I was convinced that no solution exists – according to this (nevertheless pretty old) article – http://www.civil3d.com/2006/08/the-miracle-and-reality-of-civil-3d-label-text-sizing/
ďobo
April 22, 2010 at 4:49 pm
[...] mierky Viewportu (obr. 07). Tak chytrý, aby som na to prišiel sám, ovšem nie som, elegantné riešenie pochádza z klávesnice Briana Hailey-a a snáď bude niekomu nápomocné. Ten istý problém a riešenie pre Alignments je publikované na [...]
April 23, 2010 at 5:53 am
Thanks for the link to my post. Gotta love Google Translate:
[...]Viewportu scale (Fig. 07). So clever, so I figure it out myself, I am not electronic music records, elegant solution comes from the keyboard, and Brian Hailey and hopefully someone will help. The same problem and the solution is published in the Alignments[...]
April 26, 2010 at 12:15 am
ok, translation… (well, I normally wrote a little bit “baroque” slovakian, just for fun):
“… according to viewport scale. Of course I am not so clever to solve this by myself but I found the solution from B.H. keybord and it may be useful for someone…”
regards
April 26, 2010 at 12:17 am
sorry, not “solution” but “elegant solution” .>)
May 10, 2010 at 5:09 am
Very good and clever work (trick). I would like to have a copy of this style. It would be very helpful of using all the time different label styles….!
June 18, 2010 at 2:49 pm
Pretty nifty trick. i would love a copy of that style. That will save me a ton of time.
Thanks,
Daniel
August 4, 2010 at 3:52 am
Hi.. thank you for this article. I would like to have such a label style.
Thank you.
Regards
sanju
August 29, 2010 at 1:27 pm
Excellent tip. Please forward a copy of the label style.
Regards,
Carlos
August 26, 2011 at 4:51 am
I would like to be able to resize differently for different scales or possibly not at all. A street name on a 30 scale plan looks fine plottong .2″, but at 200 scale, all the names will run together and will be much longer than the street it is labeling. But if the label didn’t resize at all, at 200 scale, they would be too small. It would be great if you could assign different heights for different scales.
September 1, 2011 at 8:27 pm
That should be fairly easy to accomplish, you’ll just need to add some if/then statements to the expression. Basically (without getting into the actual code) it would be something along the lines of;
If the drawing scale is less than X, then use this height, otherwise, if it’s less than Y, then use this other height, otherwise, use this final height.
Something along those lines should get you what you want.
September 2, 2011 at 3:33 am
Thanks! I actualy started thinking that after my post, but havn’t had a chance to try it yet.
February 7, 2012 at 7:24 am
Very Cool trick, I could use this with some modifications in out const. docs.
Thanks,
April 19, 2012 at 7:40 am
Very nice tip, and Man does that beer sound GOOD. I would love a copy of your code. This might get me into writing some modifications to it too. Thanks