0% found this document useful (0 votes)
4 views1 page

Curvedata

Uploaded by

bravomikeparle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Curvedata

Uploaded by

bravomikeparle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

(defun c:curvedata()

(setq os(getvar "osmode"))


(setq filed(open "D:\\Curve Data.xls" "a"))
(setvar "osmode" 0)
(setq Arcobj(entget(car(entsel "\nSelect the Arc" ))))
(setq rad(cdr(assoc '40 Arcobj)))
(setq ang1(cdr(assoc '50 Arcobj)))
(setq ang2(cdr(assoc '51 Arcobj)))
(setq ang(abs(- ang2 ang1)))
(setq defang(/ (* ang 180) pi))
(setq cp(cdr(assoc '10 Arcobj)))
(setq sp(polar cp ang1 rad))
(setq ep(polar cp ang2 rad))
(setq textang(/ (* (angle sp ep) 180) pi))
;(setq Textip(getpoint sp "\nInsertion Point of text"))
(setq textip sp)
(command "text" Textip "" textang (strcat "R : " (rtos rad 2 0)))
(setq d(fix defang))
(setq m(fix(* (- defang d) 60)))
(setq rm(* (- defang d) 60))
(setq s(rtos (* (- rm m) 60) 2 0))
(setq deftext(strcat (rtos d 2 0) "d " (rtos m 2 0) "m " s "s"))
(command "text" "" (strcat "D : " deftext))
(setvar "osmode" os)
(write-line (strcat (rtos rad 2 0) "m" "\t" deftext) filed)
(command "change" (cdr(assoc '-1 Arcobj)) "" "p" "c" "red" "")
(close filed)
(princ)
);defun

You might also like