LISP to generate a pline and get the area?

Discussion in 'AutoCAD' started by angelo, Jul 22, 2003.

  1. angelo

    angelo Guest

    I need a simple LISP or vba to generate a pline by clicking a point and obtain the area.
    Any suggestion?
    Thanks a lot, Angelo
     
    angelo, Jul 22, 2003
    #1
  2. angelo

    Michel Guest

    (defun c:parea ()
    (setvar "cmdecho" 0)
    (command "_-boundary")
    (princ "\nSelect internal point: ")
    (command pause "")
    (command "_area" "_o" (entlast))
    (command "_erase" "_l" "")
    (princ "\nArea is: ")(princ (getvar "area"))
    (princ)
    )

    angelo a écrit :
     
    Michel, Jul 22, 2003
    #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.