I want to write a simple AutoLISP routine that will list the slope between two entities be they points, nodes, polylines, 3dpolylines, etc. I have the basic mathematics down, but I am having problems with the remainder. Currently the program loads, but gets stuck in initializing. I know I need to get the two points, but do not know how to do this. Here is the program, can anyone help me finish it?
(defun ges( pt1 pt2 / dZ d Slope) (setq dZ (- (caddr pt2) (caddr pt1)) d (distance (list (car pt1) (cadr pt1) 0.0) (list (car pt2) (cadr pt2) 0.0)) Slope (* 100.0 (/ dZ d)) ) )