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: 

Show profile grade label in a different colour if >=13%

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
neilyj666
400 Views, 9 Replies

Show profile grade label in a different colour if >=13%

My profiles are labelled with the gradient as per screenshot but I want to highlight the profile grade text (in a different colour) where the gradient is >=13%.

 

I'm sure it is a simple fix to do this but I have no idea so can anyone assist with this please? 

 

Screenshot 2023-09-19 153901.png

neilyj (No connection with Autodesk other than using the products in the real world)
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


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
Labels (1)
9 REPLIES 9
Message 2 of 10
MMcCall402
in reply to: neilyj666

Make an expression like the one below for profile label line labels. ( I named it Grade13+) Then in the line label style make a copy of the current text component for the slope, give it a color, then give it the name of the expression for its text height.  The expression will feed the label style one of two text heights based on the slope being above or below 13%.  If its below 13% it returns 0 and the text component doesn't show.  If its over 13% it returns a proper text height and it shows up on top of the normal label.  ( I used 0.00833)   If you use the exact height of the original slope label you can just let the one with the color over write the normal label and it will hide it completely.  If not, use a background mask.

 

 

 

MMcCall402_0-1695137501943.png

MMcCall402_1-1695137560710.png

 

 

 

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Message 3 of 10
MMcCall402
in reply to: MMcCall402

You could also do this in other manners and make something like a text component with a large exclamation appear or a block appear by using the expression as its size.

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Message 4 of 10
neilyj666
in reply to: MMcCall402

@MMcCall402 thanks for this - I like the idea of a block being added as I have one (a bit big at the moment though) that would suit this; can you explain how to add this block too?

 

Screenshot 2023-09-19 163806.png 

neilyj (No connection with Autodesk other than using the products in the real world)
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


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
Message 5 of 10
Joe-Bouza
in reply to: neilyj666

Sounds similar to cut fill tics green and red.

 

two expression for the text height of segmentgrade > or <  and set the format color

 

 

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 6 of 10
MMcCall402
in reply to: neilyj666

Its very similar to using the expression value for the text component height, except now its being used for the size of a block.   Adjust the size of the block and or the size in the expression to fit your needs.

 

 

MMcCall402_0-1695140186591.png

 

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Message 7 of 10
MMcCall402
in reply to: Joe-Bouza

Joe,  It is the same type of solution just a different application.  Here it works with just one expression as the draw order of the text components takes care of which label component shows up.  No need to turn off one text component if the other one overlays it exactly when the situation calls for it.

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Message 8 of 10
neilyj666
in reply to: neilyj666

@MMcCall402 I think I have got it to do as you described but this way removes the other gradients that are not >=13%Screenshot 2023-09-19 205649.png - the >=13% looks good but can both be displayed? 

neilyj (No connection with Autodesk other than using the products in the real world)
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


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
Message 9 of 10
MMcCall402
in reply to: neilyj666

You should have 2 text components in you label style.  One that will show for all slopes and has a normal text size specified.  The second one is the one that's red and will only show when the slope is > 13%.  Use the draw order in the label style to put the red one on top of the normal one.  The red one will overlay on the normal one when the slope exceeds 13% and cover it completely.

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Message 10 of 10
neilyj666
in reply to: MMcCall402

@MMcCall402 That was what I missed...😀

 

Screenshot 2023-09-20 080134.png

neilyj (No connection with Autodesk other than using the products in the real world)
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


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report