in order to automatically retrieve the ThermalResistance in various elements, i wonder how to deploy the value from ThermalConductivity, found in BuildingMaterials for calculating the Value by the Thickness of the material.
Since i am completely new to python in Archicad, i guess using "act.BuildingMaterialAttribute" would be a proper way. So i ask for a way to read the needed value and put it into the elements.
i guess using "act.BuildingMaterialAttribute" would be a proper way. So i ask for a way to read the needed value and put it into the elements.
That would get you the Building Material Type. but your wanting to get a attribute for a particular Building Material - Thermal Conductivity. Unfortunately , you can not presently do that in Python scripts right now. This is because Python can only retrieve properties from elements and a building material is a attribute not a element.
However, This can be done via the C++ Add-Ons. I have created such a add-On which will return all the attributes of any defined building material to a Python script via the CommandHandler function. But the Add-On is currently written for the 26 release and therefore will not be available until the release of 26 -- due shortly. It can not be re-compiled for 25 since changes have been made between the 25 &26 API's.
One Note -- the C++ API always returns values in metric units (Watt/meter C), so if your are using imperial units, you'll have to convert.
I have also created the Python script which does exact;y as you described, if your interested, I'll release the add-on and the the script after 26 is released??
The Add-On and script are posted on my GitHub site:
The Add-On is data_access and the example script is GetBM.py. The script just displays the Material in a dialog. -- You will need to modify the data as needed. Compiled only fot Archicad 26.
I just figured out, that it is now possible in Archicad 26 to assign the Value of ThermalTransmission of the BuildingMaterial direct to the PSet_Parameter, which was not possible in the previous versions. But if there was a way for accessing it via Python in the German Version, it would be a good extension in the whole Pipeline.
Best Regards - Reinhard