Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trailing Zeros

Trailing Zeros

Give labels the ability to hide trailing zeros. For example the surface slope label.

 

PS. If someone has figured this out with expressions, send me a message. I was debating.

4 Comments
doni49
Mentor

I agree, it would be helpful if this could be done OOTB.  But here it is using expressions.

 

I made two expresssions (if round down and round up are equal then it's a whole number): 

  1. SlopeNoTrailZero - if(ROUNDDOWN({Surface Slope},0)*10=ROUNDUP({Surface Slope},0)*10,0.00938,0)

  2. SlopeWithDecimal - if(ROUNDDOWN({Surface Slope},0)*10=ROUNDUP({Surface Slope},0)*10,0,0.00938)

Then in the label style, I set the label component (the one for the text portion) to use the SlopeWithDecimal expression for its height and left it at one decimal place.

 

Then in the label style, I copied that same label component, set it to round to the nearest whole integer (zero places) & set the height to use SlopeNoTrailZero for its height.

C3D_NoTrailZeros.png

BrianHailey
Mentor

https://civil3dplus.wordpress.com/2012/12/23/drop-trailing-zeros-in-labels/

 

This shows how to drop multiple zeros as well as just one.

martin.folber
Advocate

Hi guys,

this would be very important feature and to be honest, I dont know, why it is not part of style settings. Your solution exactly doesnt work for 1:X slope format e.g. for slope links especially for linkslopestosurface. I have read another suggestion with text height...but I think you cannot set text height = 0.

 

Thanks

Martin

martin.folber
Advocate

Hi guys,

I would like just to mention that it is possible to customize slope label with trailing zeros using several expressions anf fortunatelly it is possible to set text height = 0.

 

Martin

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

Submit Idea  

Answer Day

Rail Community


 

Autodesk Design & Make Report