LISP PROBLEM

Discussion in 'AutoCAD' started by powellg, Jan 12, 2004.

  1. powellg

    powellg Guest

    R2002
    We use a lisp routine called EXAGAREA.LSP to calculate areas (with an exaggerated scale and suffix) The routine hangs on "C:-BOUNDARY" . Any help would be appreciated.
    thanks.
    Lisp:
    (defun C:ATX ()
    (setq ct (getpoint "Pick centre of text location: "))
    (setq a (/ (getvar "AREA") exag))
    (setq areastr (rtos a 2 2))
    (setq totstring (strcat areastr " " suffix))
    (setvar "cmdecho" 0)
    (command "text" "c" ct ht "" totstring)
    (setvar "cmdecho" 1)
    (princ)
    )
    (defun C:EXAGAREA ( / N SS1 NUM EN )
    (if (not "acadapp.exp") (xload "acadapp.exp"))
    (if (= suffix nil)
    (setq suffix (getstring t "Enter desired suffix: "))
    )
    (if (= exag nil)
    ; (progn
    (setq exag (getreal "Enter vertical exaggeration factor: "))
    ; )
    )
    (setq t1 "Text Height: <default = ")
    (setq t2 " >: ")
    (setq t3 (getvar "TEXTSIZE"))
    (terpri)
    (setq ht (getreal (strcat t1 (rtos t3 2 2) t2)))
    (if (= ht nil)
    (setq ht t3)
    )
    (setq finished "Y")
    (while (= finished "Y")
    (setq N 0)
    (setq SS1 (ssadd))
    (while (setq PT (getpoint "\nSelect internal point: "))
    (C:-BOUNDARY) ;ADS function
    (setq SS1 (ssadd (entlast) SS1))
    ) ; while
    (setq NUM (sslength SS1))
    (command ".AREA" "a" "e")
    (while (/= NUM N)
    (setq EN (ssname SS1 N))
    (command EN)
    (setq N (1+ N))
    ) ; while
    (command "" "")
    (command "erase" SS1 "")
    (command "redraw")
    (setq SS1 nil)
    (prin1)
    (C:ATX)
    (setq finished (getstring "\nContinue <Y>es, <N>o, default=<Y>: "))
    (if (= finished "")
    (setq finished "Y"))
    (if (= finished "N")
    (setq suffix nil))
    )
    ) ; end exagarea.lsp
     
    powellg, Jan 12, 2004
    #1
  2. the function name now is: BPOLY
    (while (setq PT (getpoint "\nSelect internal point: "))
    (BPOLY PT)

    hth

    exaggerated scale and suffix) The routine hangs on "C:-BOUNDARY" . Any help
    would be appreciated.
     
    Luis Esquivel, Jan 12, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.