download free lisp files free cad tips and tricks

Download Free Lisp Files For Level Interpolation Slope and Grade

Download Free Lisp Files For Level Interpolation Slope and Grade CalculationJust like many other elements and supportive stuff like, dimension styles, text styles, and cad blocks, lisp files are very common tools that draftsmen and engineers use to boost the quality and speed of work.

Download Free Lisp Files For Interpolation Slope Gradient X Y Intercept

IP=For Level/Height Interpolation Between Two Fixed Points.

DOWNLOAD IP.lsp

Or copy the below code and paste it into a text file, save the text file as IP.LSP. Don’t forget to change the file type .LSP.

;;;     IP.LSP
;;;     Permission to use, copy, modify, and distribute this software
;;;     for any purpose and without fee is hereby granted, provided
;;;     that the copyright notice appears in all copies and 
;;;     that both that copyright notice and the limited warranty and 
;;;     restricted rights notice below appear in all supporting 
;;;     documentation.
;;;
;;;     I PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 
;;;     JAMIL TAYYAB 
;;;     DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 
;;;     UNINTERRUPTED OR ERROR FREE.
;;;
;;;     Credits: JAMIL TAYYAB

(write-line "Search ->> JT CAD <<-- on Youtube for AutoCAD Tips & Tricks")
(write-line "Visit >> http://www.freecadtipsandtricks.com/ <<")
(defun c:IP ()
(setq cs (getreal "\n Start Chainage (Length):  "))
(setq ls (getreal "\n Start Chainage Level:  "))

(setq ce (getreal "\n End Chainage (Length): "))
(setq le (getreal "\n End Chainage Level:  "))

(while

(setq ic (getreal "\n Enter Your Desired Chainage:  "))

(setq gc (max cs ce))
(setq gl (max ls le))

(setq sc (min cs ce))
(setq sl (min ls le))

(setq dc (- gc sc))
(setq dl (- gl sl))

(setq gr (/ dl dc))

(setq int (* gr ic))

(setq intl (+ sl int))

(setq inte (* (- ic cs) gr))

(setq intlvl (if (= ls sl) (+ ls inte) (- ls inte)))

(setq grd (* gr 100))

(setq ics (rtos ic))
(setq ils (rtos intlvl))

(setq grds (rtos (if (= ls sl) grd (* grd -1))))

(alert
        (strcat
           "\n\n" "Chainage\t->\t" ics 
           "\n\n" "Level\t->\t" ils 
           "\n\n" "Gradient\t->\t" grds "%"
        )
)
     (prompt
        (strcat
           "\n\n" "\t\t\t\t\t\t\t\t--------------->\tChainage\t->\t" ics 
           "\n\n" "\t\t\t\t\t\t\t\t--------------->\tLevel\t\t->\t" ils 
           "\n\n" "\t\t\t\t\t\t\t\t--------------->\tGradient\t->\t" grds "%"
        )
     )

)
(prompt "\n--------Thank You-----------")

(princ)
)

(prompt "\n--------Thank You-----------")
(prompt "\nType IP to run \t\tVersion 1.9.5.11")

(princ)

GL=Gradient of Line Segment Between Two Fixed Points.

DOWNLOAD GL.lsp

Or copy the below code and paste it into a text file, save the text file as GA.LSP. Don’t forget to change the file type .LSP.

;;;     GL.LSP
;;;     Permission to use, copy, modify, and distribute this software
;;;     for any purpose and without fee is hereby granted, provided
;;;     that the copyright notice appears in all copies and 
;;;     that both that copyright notice and the limited warranty and 
;;;     restricted rights notice below appear in all supporting 
;;;     documentation.
;;;
;;;     I PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 
;;;     JAMIL TAYYAB 
;;;     DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 
;;;     UNINTERRUPTED OR ERROR FREE.
;;;
;;;     Credits: JAMIL TAYYAB
(ALERT "Life Is The Way To Knowledge And Sharing Knowledge Is The Way To Wisdom.Share Your Knowkedge And Be Wise.")

(write-line "Search ->> JT CAD <<-- on Youtube for AutoCAD Tips & Tricks")
(write-line "Visit >> http://www.freecadtipsandtricks.com/ <<")
(defun c:gl ()
(setq lvl (getreal "\n Enter Spot Level (Elevation):  "))
(setq grd (getreal "\n Enter Gradient ( % ):  "))

(while

(setq ofs (getreal "\n Enter Offset From the Spot:  "))

(setq grdp (/ grd 100))	;

( setq chg (* ofs grdp))

(setq lvl2 (+ lvl chg))

(setq sofs (rtos ofs))		;convert real to string

(setq slvl2 (rtos lvl2))		;convert real to string

(setq sgrd (rtos grd))		;convert real to string

(alert
        (strcat
           "\n\n" "Offset\t->\t" sofs 
           "\n\n" "Level\t->\t" slvl2 
           "\n\n" "Gradient\t->\t" sgrd "%"
        )
)
     (prompt
        (strcat
           "\n\n" "\t\t\t\t\t\t\t\t--------------->\tOffset\t\t\t->\t" sofs 
           "\n\n" "\t\t\t\t\t\t\t\t--------------->\tLevel\t\t->\t" slvl2
           "\n\n" "\t\t\t\t\t\t\t\t--------------->\tGradient\t->\t" sgrd "%"
        );prompt
     );strcat
);while

(prompt "\n--------Thank You-----------")

(princ)
)


(prompt "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t--------Thank You-----------")
(prompt "\nType GL to run \t\tVersion 1.11.5.11")

(princ)

GA=Calculation of Height at Given Distance From Fixed Points.

DOWNLOAD GA.lsp

Or copy the below code and paste it into a text file, save the text file as GA.LSP. Don’t forget to change the file type .LSP.

;;;     GA.LSP
;;;     Permission to use, copy, modify, and distribute this software
;;;     for any purpose and without fee is hereby granted, provided
;;;     that the copyright notice appears in all copies and 
;;;     that both that copyright notice and the limited warranty and 
;;;     restricted rights notice below appear in all supporting 
;;;     documentation.
;;;
;;;     I PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 
;;;     JAMIL TAYYAB 
;;;     DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 
;;;     UNINTERRUPTED OR ERROR FREE.
;;;
;;;     Credits: JAMIL TAYYAB

(write-line "Search ->> JT CAD <<-- on Youtube for AutoCAD Tips & Tricks")
(write-line "Visit >> http://www.freecadtipsandtricks.com/ <<")
(DEFUN C:GA()
(command "cmdecho" "0")

(setq hs (getreal "\n Horizontal Scale:  "))
(setq vs (getreal "\n Vertical Scale:  "))

(WHILE 
(SETQ PT1 (GETpoint"\n Line Starting Level:"))
(SETQ PT2 (GETpoint"\n Line Ending Level:"))


(setq a (angle pt1 pt2))
(setq ang (* a (/ 180.0 pi)))

(setq x (* (car pt1) hs))	;x coordinates of line start
(setq y (* (cadr pt1) VS))	;y coordinates of line start

(setq x2 (* (car pt2) hs))	;x coordinates of line end
(setq y2 (* (cadr pt2) VS))	;y coordinates of line end

(setq xi (/ (+ x x2) 2 ))	;mid x coordinates of line
(setq yi (/ (+ y y2) 2 ))	;mid y coordinates of line

(setq Pti (list xi yi))		;mid point of the line

(setq x3 (/ XI hs))		;x coordinates of line end
(setq y3 (/ YI VS))		;y coordinates of line end

(setq Ptt (list x3 y3))		;mid point for text

(setq xa (if (> x x2) (- x x2) (- x2 x)))
(setq ya (if (> y y2) (- y y2) (- y2 y)))

(setq div (/ ya xa))

(setq d (rtos (* div 100)))

(setq a1 (rtos ang))

(setq ga (if (> y y2) (strcat "-" d "%") (strcat d "%")))

(command "_.LAYER" "_M" "-1 Gradient Line" "_C" "253" "" "")

(command "line" pt1 pt2 "" )

(command "_.Style" "GRADE" "romant" "2.5" "0.75" "" "" "" "")
(command "_.Text" "_S" "GRADE") (command)

(command "_.LAYER" "_M" "-1 Gradient" "_C" "100" "" "")

(command "text" "_mc" ptt a1 ga )

)

)

The Code is Free to Use and Distribute.

You may also need to learn:

What is the difference between Autodesk and AutoCAD?

Fillet and Chamfer Commands in AutoCAD

20 AutoCAD Commands to Speed Up Your Performance

Refer below video to get help on how to use these Lisps Files.

In this video tutorial, 3 Auto lisp files are used. These Lisp programs are used for simple and easy calculation and Measuring height differences, grades, levels, and interpolation.

Read this very useful article on

How To Make Money From AutoCAD

Also used for the calculation of the Slope Between Two Points. These lisp files are very useful for civil surveyors, draughtsmen/draftsmen, and engineers to calculate the cross fall of the road, road’s levels interpolation, mean level calculations, the grade of road calculations, and many more. 

This set of lisps uses basic calculations of Trigonometry for the calculation of Coordinate Geometry;

These lisp files are free to use and distribute as long as all the code is not changed. Download Free Lisp Files For Level Interpolation Slope and Grade CalculationFree AutoCAD AutoLISP Program: 

Lisp to Interpolate level at the midpoint of Selected ElevationFree Autolisp Random Elevation InterpolationFree Autolisp Interpolate Elevations at a given DistancenFree Interpolation LispFree lisp for linear interpolationElevation interpolation at given point LISP.

Some Related Posts That You May Want To Look At:

Import Google Earth Map Into AutoCAD Civil 3D

1000+ People CAD Blocks free download, Human figures dwg models

Download Civil 3D Latest Version for Free

Scroll to Top