Do you mean somthing like this?
Code:
(defun c:plarea (/ selset_start selset_minus area_start area_minus)
(vl-load-com)
(if (and ((lambda ()
(prompt "\nSelect polylines for start summary areas <Cancel> : ")
(= (type (setq selset_start
(vl-catch-all-apply
'(lambda () (ssget '((0 . "*POLYLINE,SPLINE"))))
) ;_ end of vl-catch-all-apply
) ;_ end of setq
) ;_ end of type
'pickset
) ;_ end of =
) ;_ end of lambda
)
((lambda ()
(prompt "\nSelect polylines for subtract areas <Cancel> : ")
(= (type (setq selset_minus
(vl-catch-all-apply
'(lambda () (ssget '((0 . "*POLYLINE,SPLINE"))))
) ;_ end of vl-catch-all-apply
) ;_ end of setq
) ;_ end of type
'pickset
) ;_ end of =
) ;_ end of lambda
)
) ;_ end of and
(progn
(setq selset_start (vl-remove-if-not
'(lambda (x)
(and (vlax-curve-isplanar x)
(or (equal (vla-get-closed x) :vlax-true)
(equal (vlax-curve-getstartpoint x)
(vlax-curve-getendpoint x)
) ;_ end of equal
) ;_ end of or
) ;_ end of and
) ;_ end of lambda
(mapcar 'vlax-ename->vla-object
(vl-remove-if
'listp
(mapcar 'cadr (ssnamex selset_start))
) ;_ end of vl-remove-if
) ;_ end of mapcar
) ;_ end of vl-remove-if-not
selset_minus (vl-remove-if-not
'(lambda (x)
(and (vlax-curve-isplanar x)
(or (equal (vla-get-closed x) :vlax-true)
(equal (vlax-curve-getstartpoint x)
(vlax-curve-getendpoint x)
) ;_ end of equal
) ;_ end of or
) ;_ end of and
) ;_ end of lambda
(mapcar 'vlax-ename->vla-object
(vl-remove-if
'listp
(mapcar 'cadr (ssnamex selset_minus))
) ;_ end of vl-remove-if
) ;_ end of mapcar
) ;_ end of vl-remove-if-not
area_start (apply '+ (mapcar 'vla-get-area selset_start))
area_minus (apply '+ (mapcar 'vla-get-area selset_minus))
) ;_ end of setq
(alert (strcat "Start area is : "
(rtos (/ area_start 144.) 2 1)
"Sq.Ft"
"\nSubtract area is : "
(rtos (/ area_minus 144.) 2 1)
"Sq.Ft"
"\nResult area is : "
(rtos (/ (- area_start area_minus) 144.) 2 1)
"Sq.Ft"
) ;_ end of strcat
) ;_ end of alert
) ;_ end of progn
) ;_ end of if
) ;_ end of defun