@@ -29,6 +29,8 @@ class DataClass(object):
2929 construction_data : ConstructionData
3030 The prefix of this parameter indicates which statistical data about building
3131 elements should be used. Its type is the enum class ConstructionData.
32+ To utilize a custom TypeElements via parameter custom_path_type_elements (cf. below)
33+ use ConstructionData.custom.
3234 custom_path_type_elements: str or Path
3335 Custom path to JSON file of TypeElements. Default: None
3436 custom_path_material_templates: str or Path
@@ -64,10 +66,12 @@ def __init__(self,
6466
6567 """Construct DataClass."""
6668 self .element_bind = None
67- if custom_path_type_elements :
68- self .path_tb = custom_path_type_elements
69- elif not custom_path_type_elements and construction_data .is_custom ():
70- raise KeyError ("Provide path to custom type elements .json file" )
69+ if construction_data .is_custom ():
70+ if custom_path_type_elements :
71+ self .path_tb = custom_path_type_elements
72+ elif not custom_path_type_elements :
73+ raise KeyError ("Provide path to custom type elements JSON file "
74+ "or change ConstructionData to a known construction type" )
7175 elif construction_data .is_iwu ():
7276 self .path_tb = utils .get_full_path (
7377 "data/input/inputdata/TypeElements_IWU.json"
0 commit comments