Civil 3D Elevation Analysis

I’m fairly new to Dynamo so please bear with me. I was able to create a dynamos script for a user to select the surface and surface style to run the Elevation Analysis. This gets the min and max elevation form the surface. What I’m having trouble with is how to adjust the range of the elevation analysis to be every 12" starting with the min and ending with the max elevation. What I have done is added a code node to specify [a,a+1], [a+1,a+2]…and so on. Is there a better way to have the user input what range they would want, every 1’ ever 2’ of every 3’? This needs to starting from min elevation and ending at max elevation.

In order to set a Surface elevation analysis you need to specify the colors used.
How you set the color when the number or ranges depend on the min and max absolute difference?
You usually set a # of ranges and then the step (12" in your case).

Sorry I’m somewhat new to Dynamo so I don’t follow. What I’m trying to do is for the Code Block above to be automatic based on the min elevation and max elevation with the use to decide what steps between, 12", 2’ or 10’. With the code block above, it works but it only limits it to 9 ranges between the min and max elevation.

Maybe this helps:

Thank you JaLo. I was able to use what you provided and made it work. Now the issue I’m having is the color range. When i run the dynamo script it gives me all the elevation ranges, I need but it assigned the color white to all the ranges. How do io get the color range to be, in this example blue or green or yellow?

Your values need to be mapped from 0 (likely lowest) to 1 (likely highest).

Currently you are pulling values in the 700 range.

Math.RemapRange might help.

1 Like

Add colors as a joined list.
Normalize your elev values