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: 

Conditional text, expressions?

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Anonymous
2258 Views, 10 Replies

Conditional text, expressions?

Hi everybody,

I am trying to set a curve label for an alignment,

where a specific text "TYPE A" would be shown whenever the radius is 20,

or "TYPE B" whenever the radius is 40.

I know that I can't have a text as an expression result,

and that the only way would be to have my results as "TYPE 1" or "TYPE 2",

as a result of 1 or 2 using a condidtional IF function in the expression and the "TYPE " entered inside the Label,

but I would really like to find a way to get TEXT as a result.

 

Any ideas?

thank you

10 REPLIES 10
Message 2 of 11
Joe-Bouza
in reply to: Anonymous

Are you using the conditional formula to control the text height?

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

Message 3 of 11
AllenJessup
in reply to: Anonymous

See if anything HERE would give you the results you want.

 

Allen

Allen Jessup
CAD Manager - Designer
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

Message 4 of 11
Anonymous
in reply to: Anonymous

thank you both very much,

but unfortunately these have nothing to do with my case

 

no text height

 

I'm afraid I wasn't clear enough, so I'll give it another try:

I have an alignement with curves that have radius 20m or 40m and only those (no other radius applied)

and

I'd like a curve label showing the text "TYPE A" when Radius is 20m, and "TYPE B" when R=40m.

 

any ideas?

 

 

Message 5 of 11
AllenJessup
in reply to: Anonymous

THIS is probably closer to what you want. I ended up using Stacy Dunn's 2 text method. In case A force Type B text to an extremely small text height and in case B Type A will be small.

 

Allen

 

Allen Jessup
CAD Manager - Designer
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

Message 6 of 11
Joe-Bouza
in reply to: Anonymous

Until something better comes along you have to control it with text height.

 

Make text component20 and Component40 both report the crve radius.

 

you need two expression one for 20 and one for 40 each checks the radius

 

for the 20 if (radius =20,textheight, 0)

and 40 if (radius =40,textheight, 0)

 

then in the label composer set the text height for each with the expression

 

 

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

Message 7 of 11
AllenJessup
in reply to: Joe-Bouza

Joe,

 

Can you use 0? I was under the impression you had to use a non-zero number like 0.0001.

 

Allen

Allen Jessup
CAD Manager - Designer
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

Message 8 of 11
Anonymous
in reply to: AllenJessup

looks like yes you can
I tried it and it works
Message 9 of 11
Anonymous
in reply to: Anonymous

thank you very much! I got it to show what I wanted,

 

although I would call that a workaround rather than a solution...

 

and I'd like to ask the developers for a "programmaticaly" proper solution.

after all, wouldn't it be nice to have the "static text" option in the expressions function list?

 

🙂

 

Message 10 of 11
Joe-Bouza
in reply to: AllenJessup

I have used 0 and also -1.
I use -1 and the option to hide negative value in the composer

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

Message 11 of 11
AllenJessup
in reply to: Joe-Bouza

A text height of -1?

 

Allen

Allen Jessup
CAD Manager - Designer
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