2022-11-17 10:25 AM
Can you create a Label GDL that can sum?
Even if there is a hole at the bottom, it is one fill, so you can get the area with an area label, but the top two fills cannot be made with one fill. (In Autocad, it is possible to hatch as one even if it is separated)
But I need to create a Label that represents the sum of the two.
Is this possible in Archicad?
2022-11-17 03:01 PM
You can do that with an addon but I don't think GDL is able to
2022-11-17 03:47 PM
Is it possible with API?
It seems that the sum of the two fills can be expressed as text.
Isn't it possible to link with more than one object like label?
2022-11-17 03:49 PM
the API will let you create a text or label with the sum area of whatever you want.
Labels can only be linked to one element as far as i know.
2022-11-18 01:39 AM
What I'm curious about is the Label made with the API you mentioned.
Are you saying that if only one element can be connected, you can create a label that is connected to two or more elements?
I would appreciate it if you could tell me which of the api sample files to study or which function to use if the label made with the api is linked to more than two elements.
Thank you for your interest. ^^
2022-11-18 06:44 AM
The, API won't let you link multiple elements to a label.
If you look at the notification manager exemple in the API it has a file called Element_Observer.cpp, in that file there is a function Do_ClickedElementMonitor(bool)
The way it works is, you attach elements, fills in your case to the observer.
When those elements are changed it sends a notification. You can then use this notification to modifiy a label, or a text with the sum area of the fills you are observing.
Look at these functions in the APIdocumentation:
ACAPI_Notify_InstallElementObserver
ACAPI_Element_AttachObserver
ACAPI_Element_DetachObserver
2022-11-18 08:53 AM
Thank you so much ^^
2022-11-18 10:01 AM
I had this problem: I wanted to have the sum of the surface area of the flats of my project on my plan.
We resolved this kind of problem with the help of Poco and a Python script:
The script sums all the areas and put the result in a property in each zone.
We just have to retrieve the result with a label displaying the property showing the result.
2022-11-18 01:22 PM
May I ask for a more understandable explanation?
And can you tell me what should I study?
2022-11-18 02:02 PM