BIM: Fixed export of boolean IFC properties - fixes #17425

This commit is contained in:
Yorik van Havre
2024-10-24 14:49:22 +02:00
committed by Yorik van Havre
parent 66592632c4
commit ccf09f5953

View File

@@ -1657,12 +1657,16 @@ def getPropertyData(key,value,preferences):
if ptype in ["IfcLabel","IfcText","IfcIdentifier",'IfcDescriptiveMeasure']:
pass
elif ptype == "IfcBoolean":
if pvalue == ".T.":
if pvalue in ["True", "False"]:
pvalue = eval(pvalue)
elif pvalue == ".T.":
pvalue = True
else:
pvalue = False
elif ptype == "IfcLogical":
if pvalue.upper() == "TRUE":
if pvalue in ["True", "False"]:
pvalue = eval(pvalue)
elif pvalue.upper() == "TRUE":
pvalue = True
else:
pvalue = False