• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

INTERP LISP: Mark Contour Crossings Between Spot Levels

August 6, 2026

Two survey points with known levels, and a straight fall between them. INTERP works out where each whole contour crosses that line and marks it — the donkey work of drawing contours from spot levels.

What ContourInterp does

Run it along each side of a triangle of survey points and the contour crossings are all there to be joined up.

The arithmetic. The ground is taken as a straight slope between the two points, so a level L falls at

distance = span × (L - level1) ÷ (level2 - level1)

Contours at the interval you choose are stepped through between the two levels and marked wherever they land inside the span.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type INTERP.
  3. Pick the two survey points and give their levels.
  4. Give the contour interval — whole or fractional.
  5. Repeat along each side of the triangle, then join the crossings up.

How it works

The interval can be fractional and the fall can go either way. Both matter more than they sound.

Labels that go through a whole-number conversion round every level down, so a site working in half metres gets labelled 12, 12, 13, 13 — two pairs of duplicates and no half-metre contours at all.

And a loop that only steps upward produces nothing whatsoever when the second point is lower than the first, which on real survey data is half the time.

Your running object snap is left alone. Setting it to NODe on entry and NONe on exit is convenient for the routine and throws away whatever the user had set.

Notes and limits

  • It assumes a straight fall between the two points. That is the standard assumption for triangulated survey data, and it is an assumption.
  • The interval may be fractional — 0.5, 0.25 and so on.
  • Either point may be the higher one.
  • CMDECHO and BLIPMODE are restored to what they were, not set to 1.

Download and details

NameContourInterp — interpolate contour crossings between two spot levels
DownloadContourInterp.lsp — 8.8 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandINTERP
Requiresnothing beyond a CAD platform with AutoLISP.
Source size8.8 KB, 190 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • GRIDSURF LISP — import a full grid of levels as a surface
  • LEVELTAG LISP — place the level markers themselves
  • BANKSLOPE LISP — hatching the slope once the contours are drawn
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in