2022-01-28 08:07 AM - last edited on 2024-09-20 09:41 AM by Doreena Deng
I am very much eager to know that is there any way to reuse the extracted "Total Sum" value from any filed in schedule to define new Expressions based on the same?
For e.g. in the attached image, I was looking for the "Total Number of Bricks" value to use in expression which can help me to define the space or area required to stack them prior to construction. In short I was willing to extract some information related to Construction Management.
Please Note: I am not familiar with any programming languages like GDL, C++ or Python but if there is a solution for above problem by using these platforms I will try my level best to learn them 🙂
2022-01-28 09:49 AM
Hi Rajesh,
I just yesterday asked the Developer support if there's really no option to get the data from the schedules with the C++ API. Unfortunately there isn't. The Python API is less sophisticated and it's not possible as well. And I'm pretty sure it's also not possible with GDL.
Your best option would be to do compute the sum yourself with an Add-On written in C++. You can get all elements of a type on a floor and count them or get other properties. In principle you could also get all elements of some type with Python. But I think there's no option to filter them by floor with Python.
Hope that helps,
Bernd
2022-01-28 10:11 AM
Thanx Bernd for taking out time and reply. I hope GS will do needful in coming release. Till then as you have mentioned the Add-on via C++ would be something that could work so I have to learn now C++ for that from scratch. Hopefully I will try to start for that soon 😉
2022-01-28 12:36 PM - edited 2022-01-28 12:43 PM
I think that could be possible with the use of expressions. GS help has a good example here:
Example 4: Calculate a Quantity and Round Up | User Guide Page | GRAPHISOFT Help Center
Again, you could use this property value in another expression based property to calculate needed stacking area. Or you could export the schedule in xls and use that data with a call into another excell based calculation.
| Archicad 4.55 - 27
| HP Z840 | 2× E5-2643 v4 | 64 GB RAM | Quadro M5000 | Windows 10 Pro x64
| HP Z4 G4 | W-2245 | 64 GB RAM | RTX A4000 | Windows 11
2022-01-29 02:35 AM
FYI:
Expressions only work within a single object and can not address multiple objects. So trying to sum parameters (totals) from multiple objects is not possible at this time (25). All the brick examples (expressions) work only on a single object (Wall).
You could accomplish your means in multiple ways depending on the effort you feel comfortable with. The most difficult would be a C++ API AddOn. The most straight forward would be a simple export/import from Excel but would require more effort on every update.
I suspect the easiest solution would be to use a Python script to obtain the required sums. However, you did not define what you would do with the sum information, what items and the filter criteria is needed, and how you want to display the results? All this would effect the methods to be used.
A Python script would be simplest. I have attached a demo script which would, for example, provide a area sum for all slabs on a certain layer and floor. It can be easily modified for different objects and filters, basically in less than 30 lines of code. Note that the demo script filters based on floor level which is not available to Python at present. Therefore I use a AddOn Python extension (Data_Access.apx) which provides access to all AutoText properties for a object to Python, which include floor number. See my example YouTube and GitHub sites. The real question is what do you want to do with the sums? That would determine the most optimum method to use, but i suspect that a C++ AddOn would be the last resort.
2022-01-29 11:23 AM - edited 2022-02-01 01:01 PM
Gerry, thank you for clearing that out. I did not intend to suggest you could calculate multiple elements in one element's property, you' d still need to have a schedule and sum each element's property there.
You mention your example YouTube and GitHub sites, could you please share a link? I never tried python, but integrating it into Archicad gives us some very interesting options.
| Archicad 4.55 - 27
| HP Z840 | 2× E5-2643 v4 | 64 GB RAM | Quadro M5000 | Windows 10 Pro x64
| HP Z4 G4 | W-2245 | 64 GB RAM | RTX A4000 | Windows 11
2022-01-29 03:27 PM
Hi Gerry,
thanx for giving me some good guide lines. I will try the given program by you. Also soon I will send you the overall scope described for my onsite construction management related activities which can be defined by using AC's Classification & Properties.
2022-01-29 06:24 PM
GitHub Site is on Video description