When labeling your Line segments, wouldn’t it be nice to add a comma to the value at the thousands place? How about in your Parcel Labels, that display areas? Well, some of you think so, because you have asked for it. With a little bit of work, and by utilizing Expressions we can turn this:
into this:
I should start with a caveat so you can see if this is for you. This is only going to look correct for distance values over a thousand and under a million. Anything below this, the Style is still going to add a comma before the actual value, and anything above, and the second comma won’t be added. So in reality, this Style will not replace your existing Distance or Parcel Styles, but be an additional one you can use for large values. Perfect? No. But for the Civil 3D users, it will get you the end result you want most of the time.
Now that I gave you my disclaimer, I will show you how to do this with a Line Label. Think of this as breaking the value into the numbers before and after the decimal place. First we create an Expression, and then we create a new Style to put them both together.
Create Expression
This Expression deals with everything to the left of the decimal. Basically, we are dividing by 1,000 so that it will create a place at that spot.
With an Overall Length of 10550.78’, this Expression would give us a value of 10.55078’
When we set up our Style, we will change the decimal separator to a comma and get rid of the original value to the right of the decimal.
- Go to the Settings Tab of the Prospector, expand General > Label Styles > Line
- Right-click on Expressions and select New.
- In the dialog box, give the Expression a name, and then add:
- {General Overall Length}/1000
Put it together with the new Style
Now, you can either create a new Label or modify an existing one. Bring up the Label Style Composer, and go to the Layout Tab.
- In the drop-down Component Name, switch to Distance (or whatever you named it)
- Click on the Contents line
- Replace the existing contents, with the Expression you just created (in my case it is “comma”), making sure to:
- Keep the Precision to 3 places (0.001)
- Set the Rounding to “Truncate”
- Change the Decimal Character to “comma” (rather than decimal)
- Hit the blue arrow to add
OK, first part is done. If you only used this Component, it would give you a distance of 10,550. Close, but we still need to add in the remaining decimal values. The next section will be added to the right of your existing contents.
- On the right side, add a decimal point
- In the Properties pull down, select “General Overall Length with the following Modifiers:
- Set your Precision to 0.01 (or as desired)
- Rounding is set to “round normal”
- Decimal Character stays as “period”
- Output is set to “right of decimal”
- Add an apostrophe (foot) marker at the end
- Hit the blue arrow to add
- Click OK to get back to the Style Composer dialog box.
And that should do it. I walked through each step, so this sounds much more complicated then it really is. The whole process only takes a couple of minutes, but keep in mind that you will need to edit or create new Styles for any others that you want to show a distance with a comma. Use this same process for creating styles for Parcel Labels as well. You can then show your areas with a comma as well.
Enjoy!




Subscribe
Twitter