我用李·麦克的这个套路,太棒了。
它解决了我的需求。
但该金额应按顺序实时提供
对三角板的设计。
对不起,翻译的英文。
- ;;---------------------=={ Total Area }==---------------------;;
- ;; ;;
- ;; Displays the total area of selected objects at the ;;
- ;; command line. ;;
- ;;------------------------------------------------------------;;
- ;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;
- ;;------------------------------------------------------------;;
- (defun c:tArea nil
- ;; © Lee Mac 2010
- (
- (lambda ( SelSet Total i / entity )
- (if SelSet
- (princ
- (strcat "\nTotal Area: "
- (rtos
- (while (setq entity (ssname SelSet (setq i (1+ i))))
- (setq Total
- (+ (vlax-curve-getArea entity) Total)
- )
- )
- )
- )
- )
- )
- )
- (ssget
- (list (cons 0 "CIRCLE,ELLIPSE,*POLYLINE,SPLINE")
- (cons -4 "<NOT")
- (cons -4 "<AND")
- (cons 0 "POLYLINE")
- (cons -4 "<OR")
- (cons -4 "&=") (cons 70 16)
- (cons -4 "&=") (cons 70 64)
- (cons -4 "OR>")
- (cons -4 "AND>")
- (cons -4 "NOT>")
- )
- )
- 0.0 -1
- )
- (princ)
- )
|