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: 

IF statements in labels

3 REPLIES 3
Reply
Message 1 of 4
jamesbarnett
815 Views, 3 Replies

IF statements in labels

I am trying to create a label for slope ratios. I want to have the label show only whole numbers if it is a whole number and go to the 10th place only when necessary. Is there a way to use the label editor to do this?

 

I would think it would work something like

 

IF(<General Segment Grade>=0|1|2|3|4|5|6|7|8|9 then <[General Segment Grade(FRun|P0|RN|AP|GC|UN|SD|OF)]> else <[General Segment Grade(FRun|P1|RN|AP|GC|UN|SD|OF)]>)

 

but I'm not even sure I'm going in the right direction.


AutoCAD Civil 3D 2022
3 REPLIES 3
Message 2 of 4
BrianHailey
in reply to: jamesbarnett

Perhaps something like THIS?

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

Message 3 of 4
jamesbarnett
in reply to: BrianHailey

Thanks that works on + slopes, but not on -slopes. I'm just gonna keep using my two note styles and swapping the 2 back and forth.


AutoCAD Civil 3D 2022
Message 4 of 4
BrianHailey
in reply to: jamesbarnett

Instead of using the expression to return -1 and hiding the negative values, have it return 0 or .1" and then use it in the height of the text component.

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report