How do I get the area of a pt list? I've tried... (apply 'area lst) without success
I suppose this might work (defun getArea (lst) (command "area") (apply 'command lst) (command "") (getvar "area") )
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
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 | > > | > > | > | > | |
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 |