James Mussleman | Applications Expert
Many times when I’ve shown people profiles in Civil 3D, particularly the vertical curve labels, they question the way they are labeled out of the box. This got me thinking about possibly a better way to accomplish the high and low point labeling. In order to tackle the problem we first need to understand why it is a problem. We can simply create a crest label that includes the high point and a sag label that includes the low point. The only issue with this is that there are sag curves that do not contain a low point and crest curves that do not contain a high point. If you can imagine a vertical curve that joins two upward sloping tangents, this is the type that will not contain a high point and therefore the label ideally would not have those values either. Out of the box, Autodesk accomplishes this disappearing label by attaching the label to the high and low point marker. If the marker does not exist, the label does not exist. It’s pretty ingenious but is slightly flawed. This leaves the high and low point labels dependent on the location of the marker. Many clients would like these labels included in an overall dimension label for the curve. Here is the Autodesk label out of the box on the left and a more conventional label 2nd image below:
So how do we accomplish the latter? We create our label style as usual but need to separate out our low or high point values into their own text component. The remaining text can be included in one component. The next step is to create expressions. We will need two to be exact. One for the high point condition and one for the low point condition. For the low point the expression is as follows:
IF({Profile Curve End Elevation}={Low Point Elevation},0,IF({Profile Curve Start Elevation}={Low Point Elevation},0,0.1/12))
If we dissect the expression we can see that we start with an IF statement. This statement checks to see if the calculated low point elevation lands at the profile curve end elevation. If this is the case then we return a value of 0 and end the function. If this is not the case we step into another IF statement. This is commonly referred to as nested IF statements. We now check to see if the low point lands at the profile curve start elevation. Again, if this is the case we return a value of 0, otherwise we return a value of 0.1/12. This probably requires some explanation. The two IF statements are checking to see if there is actually a low point. If the low point lands on either the beginning or end of the curve then there is no true low point and the curve is between two tangents that are headed in the same direction. The return values are going to be used as a text size. Therefore if there is no true low point we will set the label text height to 0 and it will not appear. Otherwise we set the label text height to 0.1” (or whatever printed height you choose). Don’t forget to divide by 12 as the expression editor sees these values in feet not inches. In order to complete the complementary high point expression we just use the high point parameters as such:
IF({Profile Curve End Elevation}={High Point Elevation},0,IF({Profile Curve Start Elevation}={High Point Elevation},0,0.1/12))
Finally we are ready to put together our label style. We just use the corresponding expression as the text height value for High and Low point components. So for our high point label our high point component height settings list our expression name (“HP Text Height” in my case) instead of the standard printed height (i.e. 0.1”).
So what happens when we label a profile? If the curve label is a true high point the expression returns a height of 0.1” and our label shows up. If it is not our expression returns a height of 0” and our label is not visible. Here are two curves that utilize the label style:
One is a true high point and the other is just a crest curve. Therefore it does not receive a high point label. These types of text height expressions can be utilized in so many ways. This is just one way but I’m sure you can think of quite a few others where you may be able to utilize a similar procedure.
Comments