Message 1 of 24
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I really could use some help. I keep getting an error somewhere in my math functions, but I dont see it. Also, my mtext isnt working either. Im trying to add text with the variables.
(defun c:XC (/ tmn tdp mtof mtoc mdis slope mdn apron pt1)
(setq tmn (getreal "\nEnter SLOPE tolerance: "))
(setq tdp
(cond
(XSTRCASE(getreal "\nEnter standard drop or <Enter for 0.67>: "))
(0.67)
)
)
(setq mtof (getreal "\nEnter TOF: "))
(setq mtoc (getreal "\nEnter TOC: "))
(setq mdis (getreal "\nEnter Distance: "))
(setq slope (rtos (* (/ (- mtof tdp mtoc) mdis) 100) 2 0))
(setq mdn (- mtof (+ mtoc (* (/ tmn 100) mdis)) 0.375))
(setq apron (- mtof (+ 0.375 mdn)))
(if (< slope tmn)
(progn
(alert "Too High")
(command "mtext" (setq pt1 (getpoint "\nSelect Point: ") ) pt1 slope apron mtof mtoc mdis tdp "")
)
(command "mtext" (setq pt1 (getpoint "\nSelect Point: ") ) pt1 (strcat slope "%") "")
)
(princ)
)
Solved! Go to Solution.