;;线长统计
(defun c:curve_length_area (/ area d1 d2 enlst len ss)
  (cond	((setq ss (ssget '((0 . "*line,arc,circle,ellipse"))))
	 (setq enlst (fsxm-ss->enlist ss)
	       len   (apply '+ (mapcar 'fsxm-curve-length enlst))
	       area  (apply '+ (mapcar 'vlax-curve-getArea enlst))
	       d1    (/ len pi)
	       d2    (expt (/ (* 4 area) pi) 0.5)
	 )
	 (alert
	   (strcat "\n共计选取线条个数:"
		   (itoa (length enlst))
		   "\n选取线总长为:"
		   (vl-princ-to-string len)
		   "\n折算成圆直径为:"
		   (vl-princ-to-string d1)
		   "\n选取线总面积为:"
		   (vl-princ-to-string area)
		   "\n折算成圆直径为:"
		   (vl-princ-to-string d2)

	   )
	 )
	)
  )
  (princ)
)