Is there any hack to multiply the area of multiple objects in a text field?
Hello - It should be possible to add these in the text forumula, I think, , but in practice I am having trouble making that work consistently so far… I’ll see if I can figure out what the trick is.
-Pascal
It’s an addition on your screenshot…
found a solution! to do it you should use python sum() function:
%<sum([Area("1fc3823d-c274-4f31-87b4-6915ae3ddf36"),Area("ac59e0b5-0adf-4e7b-a7e2-77862e16f0ad")])>%
Hello,
Could you advise me on how to express in text fx, for example:
sum(Area*Number)?
The goal is to have the proper areas of hatches laid on top of drawings in scale, for example, 1:100. So, the area calculated in Layout should be multiplied by 100.
Thank you very much!
Tomas
I think the more correct solution is to scale everything to 1:1 and then set a necessary scale in layout to avoid future mistakes. Other way to do this you can use this expression:
%<Area(“ID”)*100>%
Thank you very much!
I have tested it, but unfortunately, it doesn’t work as expected.
I have scale drawings on paper, and the idea was to add dimensions and hatch areas on top of them in the layout space to avoid messing up the 3D model. Perhaps it’s not a good idea?
Please attach the file
@rrrrrrrrush You are great! Sorry, I don´t see the file Please, Could you please repost it.
Sorry for the long response I mean I need your file to check what is wrong
Hi @rrrrrrrrush, thank you very much. Please find the attached file. Tomas
0019_M_240626_LAYOUT TEST_1.3dm (15.5 MB)
Hi all, I just found myself in the same situation, and here’s what I have figured out:
The Text Fields documentation (Text fields | Rhino 3-D modeling) explains formatting and that Python mathematical functions are supported. So, the basic formatting for a sum is:
%<fsum([Area("ID1"), Area("ID2"), Area("ID3"), ...])>%
The only caveat is that IDs must be picked manually one by one, using the fx button, picking the object, and then removing the %<>%
at the edges of each pasted Area formula, which is a bit of a drag if you have many objects to sum… but at least it gets the job done.
See attached file.
Total Area text field.3dm (55.1 KB)