Need Help With AutoLisp Routine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys i need some help with my lisp routing, i want to simplify every day match calculations we need to work out. Here is an example:
Elevation + (Distance between 2 points / fall)
For elevation i use the Getstring
For the distance between 2 points i use the getpoint and then use the distance function to get the length between the points.
Here is my Code So far:, i cant seem to get the alert working to display the value, am i missing something here)
(VL-LOAD-COM)
(DEFUN C:ElCalc (/StartElevation Point1 Point2 D1 Slope Math1 Math2 )
(setq StartElevation (Getstring "\nEnter Elevation: "))
(setq Point1 (Getpoint "\nChoose First Point: "))
(setq Point2 (Getpoint "\nChoose Second Point: "))
(setq D1 (Distance Point1 Point2))
(setq Slope (Getstring "\nEnter Slope: "))
(setq Math1 (/ D1 Slope))
(setq Math2 (+ StartElevation Math1))
(alert "Elevation is:" Math2 )
)