*Free* lisp program to replace Acad distance command

HowFar lisp is a FREE lisp program to measure the exact distance and the X and Y components between two points (PT1-PT2) in Decimal, Fractional, Engineering, Architectural and Metric. It also gives the angle between the two points in Nearest degree, Decimal degree and degrees/minutes/seconds formats. While the dialog box displays the measurements it allows the user to change the precision of each format from 0 to 8 places precision.

TRY IT OUT.......IT'S FREE

formatting link

Reply to
medeziner
Loading thread data ...

Ummm. DISTANCE command does the exact same thing, and with a little tweaking, you get the format you want. No big deal here. A free cooler full of Labatt's Blue would get my attention. Your freebie is just not quite titillating. Sorry. Unless I'm completely missing the point, which happens occasionally. Just for fun, here is a LISP I wrote that lets you pick lines and arcs (or whatever, but it just adds lines and arcs), adds the lengths and displays a message box with the result. Enjoy. Any and all mistakes are intentional, adding spice to an otherwise perfect file.

Dr Fleau

(defun c:develop (/ iter devel $a total data1 stpt endpt distl strad endrad distr ) (setvar "osmode" 0) (setq $a nil iter 0 devel 0.0 stpt nil endpt nil strad 0.0 endrad 0.0 rad 0.0 distl 0.0 distr 0.0 total 0.0 devel 0.0 ) (setq $a (ssget)) (setq total (sslength $a)) (while (< 0 total) (progn (setq data1 (cdr (entget (ssname $a iter)))) (cond ((= (cdr (assoc 0 data1)) "LINE") (Progn (setq stpt (cdr (assoc 10 data1)) endpt (cdr (assoc 11 data1)) ) (setq distl (abs (distance stpt endpt))) (setq devel (+ devel distl)) ) ;_END PROGN ) ;_END COND1 ((= (cdr (assoc 0 data1)) "ARC") (Progn (setq strad (cdr (assoc 50 data1)) endrad (cdr (assoc 51 data1)) rad (cdr (assoc 40 data1)) ) (cond ((> endrad strad) (setq distr (* rad (- endrad strad))) ) ((setq distr (* rad (+ endrad (- (* 2 pi) strad)))) ) (t nil) ) ;_end COND (setq devel (+ devel distr)) ) ;_END PROGN ) ;_END COND2 (T nil) ) ;_END COND (setq iter (+ 1 iter)) (setq total (- total 1)) ) ;_END PROGN ) ;_END WHILE (alert (strcat "Total length : " (rtos devel) " units")) (setq $a nil) (setvar "osmode" 183) ) ;_end DEFUN DEVELOP

"medeziner" a écrit dans le message de news:

3Yadnf0xKK0RMnbZnZ2dnUVZ snipped-for-privacy@comcast.com...
Reply to
Dr Fleau

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.