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: 

Expression question : if({Instantaneous Grade}<=0,4,3)

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
498 Views, 4 Replies

Expression question : if({Instantaneous Grade}<=0,4,3)

Hi!

can someone explain expression to me.

I try to reproduce something I saw in a partner template.

 

if({Instantaneous Grade}<=0,4,3)

 

I understant that if the instagfrade <=0 part. it's the 4 and 3 that I dont understant. I know those a probably what the function return. But I cant find documentation for those parameters. 

 

So if you can push me in the good direction that would be nice!

4 REPLIES 4
Message 2 of 5
BrianHailey
in reply to: Anonymous

Basically, it goes something like this:

If the instantaneous grade is less than or equal to zero then return a value of four, otherwise return a value of three

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

Message 3 of 5
Anonymous
in reply to: BrianHailey

Hi Brian, 

 

I would like one more presision on this if you dont mind.

the 4 and the 3 in result determine a symbol from the windings 3 font (arrow left or right).

 

But I cant seem to be able to return a letter for a value to get other symbols. Is there a way to do that ?

 

thanks!

 

there is the windings key map (I would like to use F ans G instead of 3 and 4)

 

 

https://images.squarespace-cdn.com/content/v1/52b5f43ee4b02301e647b446/1445209701997-DJ5XZ946N3TVIFE...

Message 4 of 5
BrianHailey
in reply to: Anonymous

An expression is math and will only return a numerical value. The only options I've seen are to use an expression to control the height of the label. Create an expression something like "Text1" that would go something like: if "this" then return a height of 0, otherwise return a height of X. Use this expression in the label style for the height of the text with one of the characters. Create another expression that does the opposite (I'll call it "Text2"): if "this" then return a height of X, otherwise return a height of 0. Use this express in the label style for the height of the text with the other character.

 

If you are using imperial unites, text is usually displayed in inches but the drawing, and therefor the expression, is in feet. If you want your text to be 0.1", then your text height in the expression will need to be 0.1/12.

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

Message 5 of 5
Joe-Bouza
in reply to: BrianHailey

Hi Brian

 

I concur. When I saw the 4,3 I was intrigued as to what it could be passing and to what.

 

I like testing a vaue and usinfg  -1 as the false condition and then in the label style use hide negative values to get a blank cell

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report