area of pt list...

Discussion in 'AutoCAD' started by Devin, Jul 30, 2003.

  1. Devin

    Devin Guest

    How do I get the area of a pt list?

    I've tried...

    (apply 'area lst)

    without success
     
    Devin, Jul 30, 2003
    #1
  2. I suppose this might work

    (defun getArea (lst)
    (command "area")
    (apply 'command lst)
    (command "")
    (getvar "area")
    )
     
    Jason Piercey, Jul 30, 2003
    #2
  3. Devin

    Joe Burke Guest

    Really?

    Draw a rectangle. Area command. Pick lower left, upper left, upper right,
    lower right corners. Enter. OK so far. Now try lower left, upper right,
    upper left, lower right. As R. Robert would say... bwahaha!

    Joe Burke
     
    Joe Burke, Jul 30, 2003
    #3
  4. Well, in Jason's defense... he did state "might"... BwaHaHa!!! ;-)

    BTW, it looks like it works to me.

    Command: (setq ccw '((0.0 0.0) (2.0 0.0) (2.0 2.0) (0.0 2.0)))
    ((0.0 0.0) (2.0 0.0) (2.0 2.0) (0.0 2.0))

    Command: (setq cw '((0.0 0.0) (0.0 2.0) (2.0 2.0) (2.0 0.0)))
    ((0.0 0.0) (0.0 2.0) (2.0 2.0) (2.0 0.0))

    Command: (defun getArea (lst)
    (_> (command "area")
    (_> (apply 'command lst)
    (_> (command "")
    (_> (getvar "area")
    (_> )
    GETAREA

    Command: (getarea ccw)
    area
    Specify first corner point or [Object/Add/Subtract]:
    Specify next corner point or press ENTER for total:
    Specify next corner point or press ENTER for total:
    Specify next corner point or press ENTER for total:
    Specify next corner point or press ENTER for total:
    Area = 4.0000, Perimeter = 8.0000

    Command: 4.0

    Command: (getarea cw)
    area
    Specify first corner point or [Object/Add/Subtract]:
    Specify next corner point or press ENTER for total:
    Specify next corner point or press ENTER for total:
    Specify next corner point or press ENTER for total:
    Specify next corner point or press ENTER for total:
    Area = 4.0000, Perimeter = 8.0000

    Command: 4.0


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Really?
    |
    | Draw a rectangle. Area command. Pick lower left, upper left, upper right,
    | lower right corners. Enter. OK so far. Now try lower left, upper right,
    | upper left, lower right. As R. Robert would say... bwahaha!
    |
    | Joe Burke
    |
    | | > I suppose this might work
    | >
    | > (defun getArea (lst)
    | > (command "area")
    | > (apply 'command lst)
    | > (command "")
    | > (getvar "area")
    | > )
    | >
    | > --
    | >
    | > -Jason
    | > Member of the Autodesk Discussion Forum Moderator Program
    | >
    | >
    | | > > How do I get the area of a pt list?
    | > >
    | > > I've tried...
    | > >
    | > > (apply 'area lst)
    | > >
    | > > without success
    | > >
    | > >
    | >
    | >
    |
    |
     
    R. Robert Bell, Jul 30, 2003
    #4
  5. I said, might :)
     
    Jason Piercey, Jul 30, 2003
    #5
  6. Oh...

    Hourglass...

    Time for a beer...

    And a nap...

    ;-)

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Really?
    |
    | Draw a rectangle. Area command. Pick lower left, upper left, upper right,
    | lower right corners. Enter. OK so far. Now try lower left, upper right,
    | upper left, lower right. As R. Robert would say... bwahaha!
    |
    | Joe Burke
    |
     
    R. Robert Bell, Jul 30, 2003
    #6
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.