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 then statements in Expressions

3 REPLIES 3
Reply
Message 1 of 4
paulgalli5397
1825 Views, 3 Replies

If then statements in Expressions

Anyone know how to do this?  I'm hoping to come up with a radial bearing expression that I can add to a label style.  In order to label bearings, I need the expression to different things for different situations.  I don't see IF THEN in the list of commands in the expression creator box.  Any ideas?

 

Thanks!

 

Paul

C3D - 2014, Sincpac Addon
Land Surveyor
3 REPLIES 3
Message 2 of 4
fcernst
in reply to: paulgalli5397

Just IF (test,true_val,false_val)... You need to use nested IF statements.

 

It would be nice to have a Select Case Statement



Fred Ernst, PE
C3D 2024
Ernst Engineering
www.ernstengineering.com
Message 3 of 4
paulgalli5397
in reply to: fcernst

Thanks, that is working.  What about IF/AND expressions?  In this case, I'm trying to determine Quadrants, so I need to be able to determine if Both the northing and easting are positive, negative, or mixed. 

C3D - 2014, Sincpac Addon
Land Surveyor
Message 4 of 4
troma
in reply to: paulgalli5397

That's where nesting comes in.

IF (Northing>0, (IF(Easting>0, [result for both +ive], [result for Northing+ive, Easting-ive])), (IF(Easting>0, [result for Northing-ive, Easting+ive], [result for Northing -ive, Easting ive])))

Mark Green

Working on Civil 3D in Canada

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report