Ren Smith created this brief LISP routine to help determine the distance an object needs to be extruded in AutoCAD.
"A coworker asked if I could make a command to extrude an object to a distance by picking two points in the drawing. Here it is:
; Created by Ren Smith
;Extrude to a predefined distance by picking on two points
(defun C:EXTD ()
(command "Extrude" PAUSE "" (getdist " Pick Two points for Distance:")))
Notes from Cadalyst Tip Patrol: This routine is simple to use. It starts the Extrude command; you select a 2D object to extrude, then choose two points that define a distance. I couldn't get it to extrude the face of a solid — just 2D closed polygons, regions, boundaries, etc. This is a nice command to use when you don't know the distance to extrude, but it needs to match a distance between two points that are in your model already. It saves the extra step of measuring or calculating the distance and having to enter it into the Extrude command.