AutoCAD Civil 3D General

Reply
Valued Contributor
jamesbarnett
Posts: 67
Registered: ‎01-09-2013
Message 1 of 4 (185 Views)

IF statements in labels

185 Views, 3 Replies
01-12-2013 08:14 AM

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 2012 SP4
Windows 7 (64)
*Expert Elite*
BrianHailey
Posts: 2,749
Registered: ‎04-27-2005
Message 2 of 4 (172 Views)

Re: IF statements in labels

01-12-2013 04:56 PM in reply to: jamesbarnett

Perhaps something like THIS?

Valued Contributor
jamesbarnett
Posts: 67
Registered: ‎01-09-2013
Message 3 of 4 (117 Views)

Re: IF statements in labels

01-15-2013 08:56 AM 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 2012 SP4
Windows 7 (64)
*Expert Elite*
BrianHailey
Posts: 2,749
Registered: ‎04-27-2005
Message 4 of 4 (112 Views)

Re: IF statements in labels

01-15-2013 09:16 AM 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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs