
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey all,
I have a lisp that used to work just fine before. It gave me quick acreage of an area and was useful for reference.
I am on Civil 3D 2020, and it appears to be broken. It keeps giving me a value of "0". I opened up Visual Lisp to inspect. Lisp follows:
(defun c:AC ()
(SETQ IP (GETPOINT " Pick Internal Point: "))
(COMMAND "-BOUNDARY" ip "")
(SETQ SS (ENTLAST))
(PROGN (COMMAND "AREA" "o" SS))
(SETQ acres (/ (GETVAR "AREA") 43560))
(SETQ Acres (rndby acres 0.001))
(setq ktext (strcat (rtos acres 2 2)" AC" ))
(setq ht 5)
(command "_.text" ip ht "0" ktext)
(princ)
)
(defun rndby (r b / tmp)
(setq tmp (rem r b))
(cond ((>= tmp (* 0.5 b)) (+ r (- b tmp)))
(T (- r tmp))))
I am trying to find the error in my programming, or a lisp that can do what this one can. Attached is also the Lisp file for those that prefer to mess with it in VLisp.
Thanks
Edit: Accidently escalated the topic. Eitherway, anyone's input will be helpful.
Solved! Go to Solution.