We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

How can I obtain the area of a door?

luna
Contributor

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.

AC3.png

 

With kind regards,

Allen

9 REPLIES 9

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. 

 

 

SteveJepson_0-1692735941955.png

 

 

DIFFERENT COLORS OF GLASS 

SteveJepson_1-1692737442099.png

 

 

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

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

AC5.png

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.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

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

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.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

I need time to understand these operations, and I hope to have some code examples. 

Thank you for providing me with a solution. 🙂

 

Allen.

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. 

 

JoelBuehler_1-1692861242955.png

 

https://archicadapi.graphisoft.com/documentation/api_windowquantity

 

 

 

 

 

 

 

Hi, Joel

 

Thank you for providing the method. I will try it next.

🙂

 

Allen.

 

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

 

JoelBuehler_0-1692863091934.png

 

https://archicadapi.graphisoft.com/documentation/api_libpartdetails