;; | ---------------------------------------------------------------------------- ;; | MI_ArcLength ;; | ---------------------------------------------------------------------------- ;; | Function : Compute the length of an ARC ;; | Auguments: 'ename' - The entity name of the ARC ;; | Returns : The length of the arc ;; | Updated : April 15, 2000 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun MI_ArcLength(ename / len entl sa ea rad dA) (setq entl (entget ename) sa (LI_item 50 entl) ea (LI_item 51 entl) rad (LI_item 40 entl) ) (cond ((> ea sa) (setq dA (- ea sa) len (* rad dA) ) ) ((< ea sa) (setq dA (- (+ ea (* 2.0 pi)) sa) len (* rad dA) ) ) (T (setq len 0.0) ) ) len )