Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Alignment Label with Reference Text & Expressions.

20 REPLIES 20
SOLVED
Reply
Message 1 of 21
troma
5248 Views, 20 Replies

Alignment Label with Reference Text & Expressions.

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.


Mark Green

Working on Civil 3D in Canada

20 REPLIES 20
Message 2 of 21
troma
in reply to: troma

Any ideas? Anyone?

 

How do you display design road elevations in plan?


Mark Green

Working on Civil 3D in Canada

Message 3 of 21
cfarrow
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 2017
Windows 7 Professional
Message 4 of 21
troma
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.


Mark Green

Working on Civil 3D in Canada

Message 5 of 21
cfarrow
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 2017
Windows 7 Professional
Message 6 of 21
cfarrow
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 2017
Windows 7 Professional
Message 7 of 21
troma
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.)


Mark Green

Working on Civil 3D in Canada

Message 8 of 21
LeafRiders
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.

Message 9 of 21
Jeff_M
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
EESignature
Message 10 of 21
LeafRiders
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!

Message 11 of 21
Jeff_M
in reply to: LeafRiders

In your major/minor label style(s) you can add Reference Text Components which can get data from Profile, Surface, Cogo Point, a different alignment, or parcel. In this case you would use a Surface or Profile. After you add the labels you need to select them (as described earlier in this thread) in order to assign which profile or surface is to be used for the reference text. It cannot be set in the label properties of the Alignment Labels, instead, it is set in the Label Properties on the Properties palette.

Jeff_M, also a frequent Swamper
EESignature
Message 12 of 21
Jeff_M
in reply to: LeafRiders

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

Jeff_M, also a frequent Swamper
EESignature
Message 13 of 21
LeafRiders
in reply to: Jeff_M

I found the place that you're speaking and have provided a screenshot of the area where you'd add this reference text to the label style itself. Now when I head to the properties box I don't have an area as to where I would choose this.

 

Text Component Editor >

EL-<[Profile Elevation(Um|P3|RN|AP|GC|UN|Sn|OF)]>

 

Anyone show me where I'm supposed to select the profile or surface that would apply?

Message 14 of 21
LeafRiders
in reply to: Jeff_M

The key to the story, CTRL+Click on that station label in order to not select the "group" but the label itself, then you property box will give you the "Reference Text Objects" area to select. Huge Thanks for the help!

Message 15 of 21
Joe-Bouza
in reply to: troma

Hi t
you can get the profile labels and a requested interval, how?

to your earlier post.... "show design graded in plan"...

if a corridor was used you coul extract the necassary FL and add a lable style. this will give spot elevation at ever corridor interval, so you'ld want to plan for that.
Thank you

Joseph D. Bouza, P.E. (one of 'THOSE' People)

HP Z210 Workstation
Intel Xeon CPU E31240 @ 3.30 Hz
12 GB Ram


Note: Its all Resistentialism, so keep calm and carry on

64 Bit Win10 OS
Message 16 of 21
Jeff_M
in reply to: LeafRiders

CTRL+Click on a single label, or hold the CTRL key down and select by Window or Crossing window to get more than 1.

Jeff_M, also a frequent Swamper
EESignature
Message 17 of 21
troma
in reply to: Joe-Bouza

Hi @Joe-Bouza looks like I missed your question. Haven't been in this thread since 2012.

 


@Joe-Bouza wrote:
Hi t
you can get the profile labels and a requested interval, how?
...

I use an expresion to set the text height. This one sets 2mm text height at 15m stations:

 

IF((FMOD({Station Value}+5,15))!=0,0,.002)

 

I'm not sure why it wasn't working with the alignment labels of profile elevations. It is now.


Mark Green

Working on Civil 3D in Canada

Message 18 of 21
troma
in reply to: troma

Oops, that's wrong.
It's like I said.
The expression works for the profile, but you can't use an expression to set the text height for a reference text item. I got something else going on for the alignment labels.

Mark Green

Working on Civil 3D in Canada

Message 19 of 21
santhoshkurian
in reply to: troma

Hello,

 

How to place alignment lables at an offset from center line of the road  with profile elevation expressions

 

Example,

 

Finihsed grade = Profile Elavation - (Slope  x Offset) ....

 

FG = 12.50 - (2/100 x OFFSET), WHERE OFFSET IS VARYING

 

 

Your help in this regard is highly appreciated

 

Seasons Greetings

Santhosh

 

 

Message 20 of 21
facrat
in reply to: troma

Any solutions to the first question? Can't use an expression in the text height of Referenced Text in Civil 3D 2014 either. Very inconvenient!!!

GRRRR!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report