AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
Mentor
PorterCAD
Posts: 165
Registered: ‎01-09-2007
Message 1 of 14 (1,646 Views)
Accepted Solution

Filtering Grade Break Labels

1646 Views, 13 Replies
05-18-2012 12:55 PM

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? 

Jason Porter
Enceptia Technical Advisor & Civil Solutions Blogger
http://enceptia.com/author/jporter/

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.

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.

 

 

 

 

 

 

*Expert Elite*
tcorey
Posts: 2,589
Registered: ‎12-18-2002
Message 2 of 14 (1,632 Views)

Re: Filtering Grade Break Labels

05-18-2012 02:13 PM in reply to: PorterCAD

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.

Tim Corey, Owner
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
*Expert Elite*
Joe-Bouza
Posts: 4,950
Registered: ‎12-15-2008
Message 3 of 14 (1,629 Views)

Re: Filtering Grade Break Labels

05-18-2012 02:29 PM in reply to: PorterCAD

Thats what I call a golden nugget :smileywink:

Thank you

Joseph D. Bouza, P.E. (one of 'THOSE' People) Civil 3D 2012 & 2013
HP Z210 Workstation
Intel Xeon CPU E31240 @ 3.30 Hz
12 GB Ram


Note: Its all Resistentialism, so keep calm and carry on

64 Bit Win7 OS
Mentor
PorterCAD
Posts: 165
Registered: ‎01-09-2007
Message 4 of 14 (1,627 Views)

Re: Filtering Grade Break Labels

05-18-2012 02:34 PM in reply to: tcorey

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

Jason Porter
Enceptia Technical Advisor & Civil Solutions Blogger
http://enceptia.com/author/jporter/
*Expert Elite*
tcorey
Posts: 2,589
Registered: ‎12-18-2002
Message 5 of 14 (1,611 Views)

Re: Filtering Grade Break Labels

05-18-2012 04:28 PM in reply to: PorterCAD

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.

 

 

 

 

 

 

Tim Corey, Owner
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
*Expert Elite*
jmayo
Posts: 2,837
Registered: ‎11-13-2006
Message 6 of 14 (1,593 Views)

Re: Filtering Grade Break Labels

05-19-2012 08:22 AM in reply to: PorterCAD

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, PE
IDSP 2014
Win 7 64, Xeon ES165@3.2Ghz,
64 GB RAM, Quadro K4000 (x2)
Mentor
PorterCAD
Posts: 165
Registered: ‎01-09-2007
Message 7 of 14 (1,569 Views)

Re: Filtering Grade Break Labels

05-21-2012 11:09 AM in reply to: tcorey

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:

  • IF(ABS({Tangent Grade})<=0.02,0.1,0)
    to
  • IF(ABS({Tangent Grade})<=0.02,0.01,0)

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

Jason Porter
Enceptia Technical Advisor & Civil Solutions Blogger
http://enceptia.com/author/jporter/
New Member
christopheram85
Posts: 2
Registered: ‎04-30-2008
Message 8 of 14 (1,516 Views)

Re: Filtering Grade Break Labels

06-19-2012 08:12 AM in reply to: PorterCAD

This works great! 

But how would I show something other than 0%-2% like 1%-5% or something like that.

 

Thanks

*Expert Elite*
Jeff_M
Posts: 4,363
Registered: ‎07-22-2003
Message 9 of 14 (1,504 Views)

Re: Filtering Grade Break Labels

06-19-2012 10:02 AM in reply to: christopheram85

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.

Jeff_M, also a frequent Swamper
*Expert Elite*
tcorey
Posts: 2,589
Registered: ‎12-18-2002
Message 10 of 14 (1,493 Views)

Re: Filtering Grade Break Labels

06-19-2012 10:57 AM in reply to: PorterCAD

C'mon, Jeff. I was getting all that credit for your solution and now you stick your nose in here...:mansad:

Tim Corey, Owner
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.