Hey guys,
I'm trying to figure out how to create a field like this:
(/ TotalFieldAreaFromSS1 TotalFieldAreaFromSS2)
Basically prompt for two selection sets, i.e. 'SS1' and 'SS2' then for each Selection Set:
I guess I should construct the total area list or maybe the overall total area field expression?
So the task I couldn't figure out is to divide their total area fields with each other, so I could end up with a relative factor which is a field aswell.
I've dissected Lee's total area field program a.k.a.
Areas2Field and easily found how to construct the total area field expression [thanks Lee!],
but like I said the trouble I have is when I have to implement a small formulas like:
(/ TotalArea1 TotalArea2)
and
(* (/ TotalArea1 TotalArea2) 100)
So any idea how that field expression should be constructed?
This is a fragment from Lee's code that I mentioned about:
; Fragment from Lee Mac's Areas2FieldV-13.lsp code
(setq sel
(ssget '
((0 .
"ARC,CIRCLE,ELLIPSE,HATCH,*POLYLINE,REGION,SPLINE")))) (setq fmt
"%lu6%qf1") ;; Field Formatting
"%<\\AcObjProp Object(%<\\_ObjId "
">%).Area \\f \"" fmt "\">%"
)
)
"%<\\AcObjProp Object(%<\\_ObjId "
">%).Area>%" " + "
lst
)
)
)
"%<\\AcExpr "
" \\f \"" fmt "\">%"
)
)
)
)
Maybe I'll end up with a subfunction like:
(foo SS1 SS2 fmt1 fmt2)
Which would return:
(list TotalAreaSS1_fmt1 TotalAreaSS2_fmt1 RelFactor_fmt2)