Merge branch 'master' into master
This commit is contained in:
@@ -973,17 +973,18 @@ def insert(filename,docname,skip=[],only=[],root=None):
|
|||||||
if six.PY2:
|
if six.PY2:
|
||||||
pname = pname.encode("utf8")
|
pname = pname.encode("utf8")
|
||||||
if e.is_a("IfcPropertySingleValue"):
|
if e.is_a("IfcPropertySingleValue"):
|
||||||
ptype = e.NominalValue.is_a()
|
if e.NominalValue:
|
||||||
if ptype in ['IfcLabel','IfcText','IfcIdentifier','IfcDescriptiveMeasure']:
|
ptype = e.NominalValue.is_a()
|
||||||
pvalue = e.NominalValue.wrappedValue
|
if ptype in ['IfcLabel','IfcText','IfcIdentifier','IfcDescriptiveMeasure']:
|
||||||
if six.PY2:
|
pvalue = e.NominalValue.wrappedValue
|
||||||
pvalue = pvalue.encode("utf8")
|
if six.PY2:
|
||||||
else:
|
pvalue = pvalue.encode("utf8")
|
||||||
pvalue = str(e.NominalValue.wrappedValue)
|
else:
|
||||||
if hasattr(e.NominalValue,'Unit'):
|
pvalue = str(e.NominalValue.wrappedValue)
|
||||||
if e.NominalValue.Unit:
|
if hasattr(e.NominalValue,'Unit'):
|
||||||
pvalue += e.NominalValue.Unit
|
if e.NominalValue.Unit:
|
||||||
d[pname+";;"+psetname] = ptype+";;"+pvalue
|
pvalue += e.NominalValue.Unit
|
||||||
|
d[pname+";;"+psetname] = ptype+";;"+pvalue
|
||||||
#print("adding property: ",pname,ptype,pvalue," pset ",psetname)
|
#print("adding property: ",pname,ptype,pvalue," pset ",psetname)
|
||||||
obj.IfcProperties = d
|
obj.IfcProperties = d
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user