We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-08-22 10:27 AM - last edited on 2024-09-17 12:58 PM by Doreena Deng
Hi
I have encountered a tricky problem. 😞 How can I obtain the area of a door, specifically the area of two different areas of a door.
I would like to receive some tips on which APIs or other methods I should use.
With kind regards,
Allen
2023-08-22 10:46 PM - edited 2023-08-22 10:56 PM
It looks like you might mean the area of the glazing in a door. ? Which two areas of the door ? Glass and Not Glass on one side ? Sidelights and Transom vs Door Panel?
Try sorting by Surface Color or Surface Color (swatch), or something like that rather than Building Material.
DIFFERENT COLORS OF GLASS
ArchiCAD 25 7000 USA - Windows 10 Pro 64x - Dell 7720 64 GB 2400MHz ECC - Xeon E3 1535M v6 4.20GHz - (2) 1TB M.2 PCIe Class 50 SSD's - 17.3" UHD IPS (3840x2160) - Nvidia Quadro P5000 16GB GDDR5 - Maxwell Studio/Render 5.2.1.49- Multilight 2 - Adobe Acrobat Pro - ArchiCAD 6 -25
2023-08-23 02:44 AM
Hi, Steve
I'm very sorry for not expressing myself clearly.
I'm an Add-On developer.
I want to implement a function to calculate the area of a fixed area and a door leaf area in a door, which means I need to obtain the area of two different areas from a door.
I need some help on which APIs should be used in development to obtain the area of a door, and how to distinguish the areas of different areas in a door, which has troubled me a lot.
Below is an annotated image.
Kind regards,
Allen
2023-08-23 02:49 AM
I am not sure an API can help you with this unless you are creating the door with the API.
If you are just evaluating a door placed in the model, then that information will need to be calculated in the GDL of the object and stored as a parameter.
Your API can then interrogate those parameter values.
Barry.
2023-08-23 02:58 AM
HI, Barry
I am not quite sure how to obtain the required parameters in the GDL of an object. I hope you can provide a simple example so that I can quickly understand.
Thank you. 🙂
Kind regards,
Allen
2023-08-23 03:06 AM
The first task would be to see if the door objects give you the opening areas?
I don't use the default Graphisoft objects, so I am not sure if they do.
If they don't, you will need to amend the GDL scripting and calculate it and save it as a parameter.
But that means you will have to use your modified doors from now on, and you will never be able to use the default library again.
If they do, great.
You just need to get that information with your API.
How you do this in an API I have absolutely no idea as I know very little about API development.
Barry.
2023-08-23 04:04 AM
I need time to understand these operations, and I hope to have some code examples.
Thank you for providing me with a solution. 🙂
Allen.
2023-08-24 09:19 AM
hehey luna.
i did not try it bymyself but have you looked at the api_windowquantity struct from more quantitys?
looks promising. could be that one of the surface parameters returns waht you want.
https://archicadapi.graphisoft.com/documentation/api_windowquantity
2023-08-24 09:27 AM
Hi, Joel
Thank you for providing the method. I will try it next.
🙂
Allen.
2023-08-24 09:45 AM
my first suggestion was that you go after the standard properties of windows/door. if this works you would have a neat and simple solution.
the other, and unfortunatly from me also untestet approach, would be to get the library part details and analyse those.
but it seems that this struct reveals no real usefull information for your use case:
=(
https://archicadapi.graphisoft.com/documentation/acapi_libpart_getdetails?s=ACAPI_LibPart_GetDetails
https://archicadapi.graphisoft.com/documentation/api_libpartdetails