I've got a drawing in which the existing ground is so jaggedy that I've got way too many grade breaks (see the attached image). I know I can use the weeding and eliminate the labels every 50 feet, or so, along the profile. But I need to have the ability to only show a specific grade break range. For instance, I'd like for my profile only to display grade breaks between 0% and 2% and not to display anything above 2%. I've tried making an expression, but have been hitting brick walls. I also know I can manually (use the CTRL + click) select the specific labels that I don't want and erase them, but I've got lots of these labels. Is there anyone out there (much more savvy at this than I) who knows of a LISP routine or an expression that can accomplish this?
Solved! Go to Solution.
Solved by tcorey. Go to Solution.
Solved by tcorey. Go to Solution.
I learned this just the other day, thanks to Jeff_M.
IF(ABS({Grade Change})<=2,0.10,0)
Then, in the label style, instead of using a fixed text height, use the expression name. It will be available in the list where you give text height for the components.
Thats what I call a golden nugget
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.
Tim,
Amazing! I was using the wrong set of codes for the expression and was attempting to use it in the completely wrong area. Thank you very much!
One more question, does your buddy Jeff_M also have a the code for filtering out the percent grades along the profile. I'll play with the expressions again but thoght I'd ask anyway.
Regardless, thanks for the response.
Jason
To filter the label by slope, make an expression under Profile-->Label Styles-->Line.
IF(ABS({Tangent Grade})<=0.02,0.1,0)
Use this expression as the text height in the label style. To filter on different value than <= 2%, adjust the first number, where I put 0.02. Four and a half percent would be 0.045, etc.
The expression is the best way to filter the grade labels by percent but there is another way to simply reduce the number of labels. You all probalby know this but just in case,
In the profile properties dialog, bands tab, add a label weeding factor to the band. This will not filter by slope but if you just want fewer labels this tool is provided.
John Mayo
Tim,
You solution worked GREAT! ! ! ! After creating the expression, I went into my "percent grade" label style. I verifired that the expression was set for Tangent Grade. For the text height i set the value to be the name of the expression. In your expression code I had to change the text height value form:
After that was set my labels are filtered perfectly and the text height is correct. Not sure why the text height must be set to 0.01 in order for the text to appear 0.1 in heigt, but I don't care. It works.
Thanks for all your input,.
Jason
This works great!
But how would I show something other than 0%-2% like 1%-5% or something like that.
Thanks
This is for showing only 1% thru 5%:
IF(ABS({Tangent Grade})>=0.01,(IF(ABS({Tangent Grade})<=0.05,0.01,0)),0)
Adjust the 0.01 to work with your text size. For imperial drawings, if your normal text height in the style composer is 0.10", then this should be 0.10/12.
C'mon, Jeff. I was getting all that credit for your solution and now you stick your nose in here...
Tim,
I was already giving you credit for it on my blog (http://dccadd.com/dirt). Now I need to add Jeff. Do either of you mind if I use your full names?
Jason
This code works great for showing percent slope ( IF(ABS({Tangent Grade})<=0.02,0.01,0) ) but what should I add to the expression if I wanted to say show me all grades less than 2% and greater than 0?
Thanks
P. Lynch
Your expression says {Grade Break}. It should be {Grade change}
Hi Tim
is the grade break entered in percent or ft/ft? im getting some unexpected results. Also, on my system the text height needs to be 0.001 to get leroy 100 otherwise it is huge. Any idea what I'm missing?
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.
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.
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.