🌐 Show Forums for All Locations
Land Surveyor Community


might anyone be able to guide me on how to generate contour from lisp.  Thanks I appreciate your help.

You need to be a member of Land Surveyors United - Global Surveying Community to add thoughts!

Join Land Surveyors United - Global Surveying Community

Votes: 0
Email me when people reply –


  • my dear friend pls send me this lisp in my email id   [email protected]

  • GEO Ambassador

    Tell me if this helps

    Unzip files to Autocad support directory or any directory in Autocad's search path. Type (load"ctl_w8") at the command prompt to load routine.  Type "CTL" at the command prompt for option list.  Command: ctl                    1. Draw Triangulated Surface.                   2. Draw Contour Lines.                  3. Swap Triangle Pairs.                         4. Re-point Contour Lines.                      5. Color Objects.                       6. Read/Write CSV Point File.                   7. Annotate Contours.                   8. Create 3D Mesh.                      S. Cross Sections from Contours.                        A. Area Calculations.                   Q. Quantity from Surface.                       R. Replace Individual Points.                   X. Import Excel Point File.       Option 1 creates a triangulated surface from all points found on layer "CTL_PNT".  It prompts to check points before the surface program runs.  If any points are closer than 1.0 unit apart or there are duplicate points in the drawing, the program will hang.  If too many of your points are closer than 1 unit and you can't move or delete them, you'll have to scale all of the points up to create the surface and then scale it back down to the original scale.  The check option will delete any duplicate points and draw a circle on layer "CTL_PTMP" around the points closer than allowed.  More points don't necessarily create a better contour map but will only increase the dwg size. Don't use any more points than the resolution you need.  Option 6 or X import on layer CTL_PNT.

    If you don't have any points, check out these DEM Point Selection programs.

    If you need to change a space separated point file to a comma separated file, try one of these command line programs.
    32 bit version s2csv32.exe <158kb>  or 16 bit version sp_2csv.exe. <14kb>  (8 character file names only.)


      Option 2 draws plines thru each triangle surface on temporary layers, then selects all lines on each elevation, joins them and asks if you want to create spline fit curves. Spline curves take up a huge amount of drawing space and lose accuracy on sharp contour corners if not enough points are supplied.  If successfully joined/splined, it changes         each contour to layer CTL_CONT and deletes all temporary layers.      Option 3.   You may need to swap triangles to force adjacent sides to run straight down a ridge line or up a valley line.  If you swap triangles, the program moves all points on layer "CTL_PNT" to layer "CTL_PTMP".  Every time you create a surface with option 1, the program erases any existing surface created on layer "CTL_TIN".  The points were moved so you don't accidentally resurface and lose any swapped triangles.  Just keep running option 2 until you get the contours the way you want.  Option 2 automatically erases any existing contours on layer "CTL_CONT" and re-contours.


      Option 4  uses the MEASURE command to create more points along existing contour lines. You may want to do this to create a more dense surface model to use with the 3D Mesh option 8.  More on that later.

    This option erases all existing points on layer "CTL_PNT" so make sure you have a backup point file before using this option.
          Option 5.   This switches to a front view, uses the latest contour spacing with the left and right limits to select and color contours.  If you run this option before option 2, it will prompt you for a spacing distance to use.      Option 6  imports any xyz comma separated point file onto layer "CTL_PNT" or writes any   selected points on layer "CTL_PNT" or "CTL_PTMP" out to a comma separated point file   and deletes all selected points from the drawing.      Option 7 annotates by picking a point on any contour line. It will prompt to either break the contour line or place the text above the line.  Drag the cursor to the right to align the text.  It will prompt you for a text size so you should check for clearance between contours.  It reads the elevation from the pick point so you don't have to type anything.  Occasionally it misreads the elevation by 1 and writes a wrong elevation like 5999 instead of 6000 (it's a fuzz factor error).  I know it's painful but you might have to manually fix this.  The text is written at that elevation on layer "CTL_CTXT".

      If you colored your contours with the Major/Minor option, the major lines should already be on even elevations.  50 unit contours spaced at 5 show up above.  A 20 unit contour spaced at 5   should all be even 100 units or 40 units spaced at 5 should all be 200 unit elevations.             Option 8 creates a 3Dmesh.  It asks whether you want to sample for points or 3D faces. It prompts for a lower left and upper right point for the mesh boundary, grid spacing, and base elevation.  You can press "A" or "B" to ignore any points above or below the base elevation. It selects entities in the drawing with a crossing window the size of each grid spacing and takes an average of all elevations it finds.  If it finds nothing in a crossing window, it uses the base elevation. You're limited to 256 x 256 on any one grid.

              Option S creates cross sections from contours on layer CTL_CONT.  You need to draw a "LINE" over the contours to section.  It searches along the section "LINE" with a crossing fence and will prompt you for a fence distance.  If the fence is larger than the smallest contour spacing, you could miss some contour points.  It will prompt for a starting station if your sections are equally spaced and you want to add stations to your profiles.  It only takes integer values. You can always overwrite the default station number and reset the forward spacings.  The profiles are drawn left to right from the direction the section line was drawn.  If you get it backwards, you can either rotate the section line 180 degrees or just mirror the profile since it's center based. This only works while in Plan view of World Coordinates. Don't change pline widths before using this.

          Option A calculates areas by using the boundary command.  It uses the pick point as the text location and will prompt for a text size.  It temporarily displays a red          boundary and prompts you to accept or decline the area shown.

                 Option Q calculates quantities from a triangulated surface relative to a base elevation. The total surface area must remain constant and you derive the actual volume by the difference between each surface change.  The example below only shows the need to set the base elev. below  any anticipated excavation elevation. The default base is the lowest triangle point and can  remain unchanged for fill quantities, but the actual volume is still the difference between           surface changes since the world ain't flat. ( I don't think it is.)                      This only works on triangulated surfaces.

                 Option R inserts points from an xyz.csv point file one at a time and allows you to  drag a box around any existing nearby points to erase.  This is just an easy way to replace  individual points if you're running incremental quantity surveys with option Q.  After all   points have been inserted, it gives you the option of saving all points as an incremental     backup point file with a (YYYYMODD.csv) default file name or whatever name you want.                       Option X imports Excel point files.  It was written for files created by survey              data collection gizmos that write point files with 5 fields:

    Point #, Northing, Easting, Elevation, Description (if any)
      Northings to a surveyor are Y values to Autocad and Eastings are X values.  They usually have the choice of writing these files as N-E or X-Y but you never know.  Autocad requires the input as x-easting, y-northing, z-elevation so this gives you the option of switching the X-Y fields.  It also changes the current PDMODE point style to an "X".  If you choose to insert point #'s and descriptions, they're written at 1/2 point size to the sides of each point on layer "CTL_PTXT".  This will still read any "xyz.csv" file incase you need to swap X-Y. This loads a separate visual basic function and requires you have Microsoft Excel installed. I've only tested this with Excel 2000.

This reply was deleted.

Answer As your Facebook Page

Global Surveyor Forum

Latest Discussions by Category


You are not logged in


Land Surveyor Community Forum

Many if not most land surveying related topics are evergreen - meaning the topics of discussion are many times timeless.  If you have a question regarding Land Surveying in general, this is the place to ask your surveying related questions.    

Add Discussion

How to Use Forums

How to use Forums
Our forums on Land Surveyors United are here to be used as much for finding help with problems in the field as the are for you to express your opinions on anything that has to do with land surveying in general. Feel free to share anything that is on your mind, as long as it isn't meant to damage another member's reputation. Please keep it clean and help insure that everyone has the opportunity to enjoy the benefits of being part of a community that grows together.

We are committed to allowing freedom of expression for all of our members, and that includes maintaining a safe space for people with opposing views to express themselves. We get posts from all over the country and even the globe, so needless to say, people come with different viewpoints on lad surveying practices and processes. We see this diversity and variety as a real strength-- dialogue and debate are an integral part of the educational process, as well as an important tool in exploring different sides of complex issues.

All Community Hubs inside the community have their own forum for asking specific questions to other surveyors, by location, equipment type, etc.

Global Forums

Hey there!
It looks like you are enjoying the community content.

That's nice! Please don't forget to mention us if you use what you just copied on your website. Help strenthen the community by linking back to us!

Thank you very much! Have a nice day! :)

Ok. Don't bother me again, for this session.