AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
*Expert Elite*
troma
Posts: 2,525
Registered: ‎05-21-2008
Message 1 of 16 (1,136 Views)
Accepted Solution

Alignment Label with Reference Text & Expressions.

1136 Views, 15 Replies
10-30-2012 08:15 AM

I'm trying to create an alignment label to display profile elevations at regular stations.  Two questions:

 

1.  I use an expression to set the text height.  When I add a regular text component in the label this works fine, but when I add reference text I can't seem to use the expression as text height.

 

2. I want to use an expression to 'Truncate' the elevation, so that 178.35m displays as 78.35.  I can't find a way to create an expression to do this (within the Alignment station labels).

 

Thanks for any suggestions.


Credit where credit is due! Give kudos or accept as solution whenever you can.

Oh, I'm sorry. I misread your original request. Scratch my last reply. Try this one:

 

{Profile Elevation}-100*(TRUNC({Profile Elevation}/100))

 

Add it to your Profile expressions, and add a reference text to your station labels. The only downside is you have to individually select each station (by CTRL-clicking) and tell it the reference object. I don't know of a better way to reference a profile for the entire station label set.

 

Did that answer your question?

Here's a short video demonstrating the process:

 

 

And a link to the larger version: https://chronicle.autodesk.com/Main/Details/a7e76d36-0cdd-432c-a87a-9392b134e85e

*Expert Elite*
troma
Posts: 2,525
Registered: ‎05-21-2008
Message 2 of 16 (1,110 Views)

Re: Alignment Label with Reference Text & Expressions.

10-31-2012 01:36 PM in reply to: troma

Any ideas? Anyone?

 

How do you display design road elevations in plan?


Credit where credit is due! Give kudos or accept as solution whenever you can.

Contributor
cfarrow
Posts: 17
Registered: ‎06-08-2012
Message 3 of 16 (1,101 Views)

Re: Alignment Label with Reference Text & Expressions.

10-31-2012 02:01 PM in reply to: troma

I attempted your first question myself in Civil 3D 2012 and also found that expressions can't be used to control text height of referenced objects. I'm assuming that due to the variety of objects that you can reference, expressions can't be written to control certain types of objects.

 

As to your second point, we have a style for top of curb elevations that does exactly what you want, except we truncate down to the ones, not tens. I'd assume your expression would look like:

 

{Station Value}-100(*TRUNC({Station Value}/100))

 

Add this to the expressions under Alignments ->Label Styles->Station->Major Station. Format it as a Station, and add it to your label style. You may want to only show the right side of the "+" sign if that's all you want to see.

Clayton Farrow
Civil 3D 2014
Windows 7 Professional
Intel Xeon E31270 @ 3.4 GHz
8 GB, 64-bit
*Expert Elite*
troma
Posts: 2,525
Registered: ‎05-21-2008
Message 4 of 16 (1,097 Views)

Re: Alignment Label with Reference Text & Expressions.

10-31-2012 02:17 PM in reply to: cfarrow

Thanks!

 

 

I'm a little confused about this part:


cfarrow wrote:

.... 

As to your second point, we have a style for top of curb elevations that does exactly what you want, except we truncate down to the ones, not tens. I'd assume your expression would look like:

 

{Station Value}-100(*TRUNC({Station Value}/100))

 

Add this to the expressions under Alignments ->Label Styles->Station->Major Station. Format it as a Station, and add it to your label style. You may want to only show the right side of the "+" sign if that's all you want to see.


Elevation, or Station? I can get Station to work, but it's Elevation I'm looking for.


Credit where credit is due! Give kudos or accept as solution whenever you can.

Contributor
cfarrow
Posts: 17
Registered: ‎06-08-2012
Message 5 of 16 (1,092 Views)

Re: Alignment Label with Reference Text & Expressions.

10-31-2012 02:37 PM in reply to: troma

Oh, I'm sorry. I misread your original request. Scratch my last reply. Try this one:

 

{Profile Elevation}-100*(TRUNC({Profile Elevation}/100))

 

Add it to your Profile expressions, and add a reference text to your station labels. The only downside is you have to individually select each station (by CTRL-clicking) and tell it the reference object. I don't know of a better way to reference a profile for the entire station label set.

 

Did that answer your question?

Clayton Farrow
Civil 3D 2014
Windows 7 Professional
Intel Xeon E31270 @ 3.4 GHz
8 GB, 64-bit
Contributor
cfarrow
Posts: 17
Registered: ‎06-08-2012
Message 6 of 16 (1,090 Views)

Re: Alignment Label with Reference Text & Expressions.

10-31-2012 02:38 PM in reply to: cfarrow

Also, I suppose you could CTRL-click all of the labels in the group and give them all the same object to reference, I just wish you could select the station group itself and add an object as a reference.

Clayton Farrow
Civil 3D 2014
Windows 7 Professional
Intel Xeon E31270 @ 3.4 GHz
8 GB, 64-bit
*Expert Elite*
troma
Posts: 2,525
Registered: ‎05-21-2008
Message 7 of 16 (1,072 Views)

Re: Alignment Label with Reference Text & Expressions.

11-01-2012 07:34 AM in reply to: cfarrow

Cool, thanks!  I had no idea you could put an expression in the profile label family, and refference that expression from the alignment label.  I was looking for somewhere in the alignment label to create the expression.

 

Don't know why it has to be such a pig to use it!  The 'Profile Geometry Points' works beautifully—you set the profile right within the alignment labels dialogue.  For these ones you have to Ctrl+click, then go to properties.  For some reason the properties box doesn't have a pull-down, you have to click on a button, then right-click in the drawing and select from a list.  And this is a list of all profiles, not just ones on that alignment!  Seriously, I can pull the elevations from one street and display them as alignment labels on a totally different street?

 

 

For anyone else reading, the accepted solution is only a solution for my second question.  Still wondering about the first.

(I used FLOOR instead of TRUNC.  When I was setting up feature line labels the TRUNC didn't work as expected, so I didn't even try it here.  FLOOR worked.)


Credit where credit is due! Give kudos or accept as solution whenever you can.

*Expert Elite*
LeafRiders
Posts: 348
Registered: ‎09-28-2010
Message 8 of 16 (433 Views)

Re: Alignment Label with Reference Text & Expressions.

04-17-2014 09:12 AM in reply to: troma

I'm looking for a very similar answer to a very similar question and maybe those within this post can help me out. At the very least it will bump this old post up a bit and see if we can't solve the primary question. 

 

As I add labels to my alignments, preferrably with a label tyle - "Station Offset", I was hoping to add ELEV.= ____ to the label style of my "Station offset label style:" However, that isn't available as an option. To summarize I would either like the profile elevation or the the EG surface elevation at the point selected for my Alignment label. Is this possible, and if so what would the expression look like. (Where is the best location to save this expression?)

 

Thanks in advance.

*Expert Elite*
Jeff_M
Posts: 4,519
Registered: ‎07-22-2003
Message 9 of 16 (426 Views)

Re: Alignment Label with Reference Text & Expressions.

04-17-2014 09:18 AM in reply to: LeafRiders
Add a Reference Text component to your label style. No expressions needed. You can add either a Profile reference or a Surface reference (or both if desired).
Jeff_M, also a frequent Swamper
*Expert Elite*
LeafRiders
Posts: 348
Registered: ‎09-28-2010
Message 10 of 16 (420 Views)

Re: Alignment Label with Reference Text & Expressions.

04-17-2014 10:04 AM in reply to: Jeff_M

I can see where you would add profile or elevation data to your label style within the Profile Geometry Points - Alignment labels. That isn't the problem. As you can see by the attached image, is that you can't set these "elevation labels" based on a alignment station interval, nor have them populate for the horizontal geometry points only.

 

The point is I want the elevations labelled a specific horizontal geometry not vertical geometry. Seems like a simple request, but every angle I've tried thus far isn't opening any doors. Thank you!

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.