From the Ground Up
A European perspective on design and out of the box thinking with Civil 3D.
About Jack About OveLatest Post
- posted 10/08/07 by Ove Cervin Assigning elevations to contours
- Hi again,
Today I got some great help!
Our colleague Nicholas Menu, Autodesk EMEA C3D Support team, wrote a .LSP for us as we had a whish regarding elevations on contours.
Sometimes you're stuck with old data that has Zero elevations. If those are drawn as Polylines to present contours, but has Z=0, you have quite some work to create an existing ground surface.
Nicholas Lisp moves the polylines to an elevation automatically if you set the starting elevation and the interval for the set of Polylines.
Below I have some images showing the procedure:
First - a set of Polylines without elevation.

Here I have created a Surface just to make it more obvious that they have no elevation.

Use the command in the loaded .LSP, "chelev"

Pick the first point for the line to be drawn. This should be on the lower side of the "slope" presented by the contours.

Click the second point of the line on the higher side.
Then add "Start level" for the contour set.

Set value for interval between contours.

VOILA!
As Civil 3D is a dynamic software, and so is the Surface, it is updated directly with the correct elevations.
(See the Tooltip on the cursor)

Enjoy!
Thanks Nicolas.
Here's the .LSP-file for download.
Download file
// Ove Cervin

User Comments
I've modified this routine to erase line line after it's done with it.
Add:
(command ".erase" (entlast)"")
at the end before (princ), and the construction line will be removed for you.
Great routine Nickolas, thank you!
Posted 10/8/2007 12:17 PM by Matthew Risch
Posted 10/11/2007 2:21 PM by paulus sia
Hi.
it's great and save a lot of time.
what happend if there are variations in levels, I meant increasing and decreasing?
Posted 10/11/2007 2:25 PM by paulus sia
Found a little mistake....for non english versions.... :-)
ssget "F" has to be change for ssget "_F"
(setq ss1 (ssdel (entlast) (ssget "_F" (list pt1 pt2 ))))
Anyway....GREAT TOOL, and thank you very much!!!!
Posted 10/13/2007 5:21 AM by Pedro Jesus Ortiz Toro
Hi guys,
First - thanks to Nicolas who wrote it ;-)
I'll add the added information to the .LSP and re-publish it again this week.
Note: If you have contours whith elevations that are not linear you have to do it in several steps.
Thanks for the positive comments! Best regards / Ove C
Posted 10/15/2007 2:26 AM by Ove Cervin
Ove,
Thank you so much for this utility! I am an AE and have had many clients ask me to do this very thing. I always thought that this workflow could be better accomplished through LISP, rather then changing them manualy through the Properties palette. Of course, you have to know LISP (which I don't :-)... I think you have motivated me to learn LISP after seeing that this routine is only ~15 lines.
Thanks again!
-Seth Cohen
Posted 10/23/2007 5:30 AM by Seth Cohen
Well - nice that you liked it Seth. It was actually Nicholas who wrote it ;-)
I agree that it would have been nice to know more of lisp. That was the only part in the manual of R10 that I didnt learn... ;-) // Ove
Posted 1/9/2008 4:50 AM by Ove Cervin