So you have some short pipes and you have some long pipes. Labeling the long pipes is just fine but when you label the short pipes, the text is longer than the pipe so you have to manually edit the label and put those line breaks in or you have to change the style the label is using for one that stacks the different pieces of data. Well NO MORE! Come on now! This is CIVIL 3D we’re talking about!
As long as you have Civil 3D 2012 that is…
Anyways, in Civil 3D 2012 there is a new option in the label style to set a maximum length to a text component. We can use this to specify how long we want the label to be. Now, the trick here is to use an expression for the maximum label length. We have to do this because the length of the label is measured in plotted units, not absolute model units.
The expression will look like this:
To create the expression, on the settings tab in Civil 3D, expand out Pipe, Label Styles, Plan Profile. Right click on Expressions and choose “New”. Give it a name (this will appear in the label style later), a description (this is optional), and the expression itself.
Now that the expression is created, you can add this to your label style. In your pipe label style, simply add this expression to the Maximum Width of the label text component.
Your expression will now show up as an option for the Maximum width of your label. Once you have applied this, your label will automatically adjust for you.
As you can see in this example, there are some limitations. If any single word is longer than the pipe length, it will not be wrapped. Additionally, if you want a buffer around the ends of the pipe, you can simply modify the expression and subtract off half the twice the distance you want at each end (1/2″ buffer at each end means subtracting 1″ from the expression).
Hope this helps someone with their labeling issues and thanks to Brooke for coming up with the great idea!