How to calculate slope with contour lines

How to calculate slope with contour lines

Anonymous
Not applicable
6,012 Views
10 Replies
Message 1 of 11

How to calculate slope with contour lines

Anonymous
Not applicable

Hello, 

First things first, I'm a new user of AutoCAD so please forgive me if this is a simple question. I have a DWG with contour lines with associated elevation (based on what I can see in properties). I searched on how to calculate the slope of a line I would draw over the existing contour lines and the only thing I was able to find that seems to make sense with what I want to do is: https://knowledge.autodesk.com/support/autocad-map-3d/learn-explore/caas/CloudHelp/cloudhelp/2021/EN... 

When I try it, it's not giving me anything. 

Can anyone please help with this? Thanks!

0 Likes
Accepted solutions (2)
6,013 Views
10 Replies
Replies (10)
Message 2 of 11

Pointdump
Consultant
Consultant
Accepted solution

Hi Genevieve,
Thanks for posting your drawing. I had never tried MAPCGSLIST before, so I drew a line from one contour to another. Works pretty good. I also tried it by typing "P" and selecting 2 points.
When you drew your line did you have OSNAPZ set to 0?

 

Slope_1.png

 


Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
Message 3 of 11

АлексЮстасу
Advisor
Advisor

1. To get the result from this command (CGSLIST), your "line" must be drawn with the primitive type AutoCAD either Line or Arc.
2. In order for the slope to be not "Horizontal," it is necessary that the ends of Line are with different Z.
If Line draws with Object Snap (F3) enabled, snapping to contours, the Line ends will be at horizontal heights - if OSNAPZ is 0.

 

I will assume that in Civil 3D of means of receiving slopes, profiles and so forth it is much bigger, than in Map 3D.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 4 of 11

Anonymous
Not applicable

@Pointdump Thank you for your response.

I tried again making sure OSNAPZ was at 0 and I still have 0. I also tried with a simple line and 2 points. Please check the attached file. Could it be different for you if you're using Civil3D?

thanks!

Message 5 of 11

Anonymous
Not applicable

Thanks @АлексЮстасу 

Is it possible that I need another step if I'm using only Map 3D and not Civil 3D? I still get 0% slope when I create a simple line and when autosnap if off. 

I'm attaching the line properties in case it's related to the Z reference you mentioned. I see it at 0 but I have no clue how for it not to be 0. Please help.

thanks

Message 6 of 11

Anonymous
Not applicable

@АлексЮстасу and @Pointdump 

Ok so my problem is definitely the Z value which is 0. How do I fix? Should the Z value of each line correspond to the elevation number i see in the properties? If so is there a way for me to change that easily without doing line by line? Sorry I'm very new with Autocad and I'm not sure what I should do here. Thank you!!

Message 7 of 11

Pointdump
Consultant
Consultant
Accepted solution

Genevieve,
Did you use an Endpoint Object Snap to Snap to a Contour Vertex to create your line? That's the only way you'll get a line with elevations.
I do indeed have Civil 3D, but I was in Map Workspace.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
Message 8 of 11

Pointdump
Consultant
Consultant

Genevieve,
"...is there a way for me to change that easily without doing line by line?"
No way I can think of in Map.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
Message 9 of 11

АлексЮстасу
Advisor
Advisor

What is the value of OSNAPZ?

The ends of the selected Line in the image 2021-02-12 16.41.30.png are not on the contours, i.e. they could not get Z automatically.
Either enter Z Line ends manually in the Properties window, or go to Civil 3D.

In Civil 3D, you can make a terrain model from contours, and get heights at any points in the model, for any line.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 10 of 11

Anonymous
Not applicable

@Pointdump Ok so essentially, you say that the snap function should be ON? I understood the contrary.

Message 11 of 11

Pointdump
Consultant
Consultant

Genevieve,
Yes, snap to a vertex on your contours, or use Alexander's idea of entering endpoint elevations in the Properties Window.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025