boroianu Posted September 12, 2014 Posted September 12, 2014 I've been using the lisp AreaLabelV1-9 by lee Mac (saved huge effort for me, 10x by the way) for makig table with areas of a floor plan. In my pre- editted acad table (room number/ room name/ area (sqm)) I've been inserted the areas with "insert cell"option of acad. All good till now! The problem is that I have to calculate the sum of area values at bottom of the table and the "sum" function uses for calculations whole value of areas( all digits after comma) and the result is correct but different than summing the shown values. ex: 1. 1.34 sqm (displayed) 1.33561120 sqm (real value) 2. 2.23 sqm 2.22559221 sqm (real value) 3. 4.45 sqm 4.45562100 sqm (real value) Total 8.01 sqm (displayed) .....8.02 sqm (from summing the displayed values) The logical solution would be to round all table values at 2 decimals roud(c1,2) etc..and then to make the sum. But till now I didn't figure out how to do it. I have to make around 900 tables (for each floor plan) and for each appartment brom the building. Can anyone please help me with a lisp/suggestion/ whatever in order to obtain the sum of rounded values in field table??? Quote
Stefan BMR Posted September 12, 2014 Posted September 12, 2014 You can change the following lines in Lee's code (each appears twice in code): (strcat "[color=red]%<\\AcExpr (0.01*round([/color]%<\\AcObjProp Object(%<\\_ObjId " (_GetObjectID acdoc p1) ">%).Area[color=red]>%*100))[/color] \\f \"" fo "\">%" ) and (strcat ap (rtos (* cf (vla-get-area p1)) 2 [color=red]2[/color]) as) However, this will affect only new tables. Also you must consider others settings, like DIMZIN or FD variable in Lee's code. Quote
boroianu Posted September 12, 2014 Author Posted September 12, 2014 Many Thanks Stefan! It worked and it gets me out of trouble. Quote
Stefan BMR Posted September 12, 2014 Posted September 12, 2014 Many Thanks Stefan! It worked and it gets me out of trouble. Glad to hear it. All credits to Lee Mac. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.