mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 03:40:59 +00:00
Accomodate invalid psets without properties created by Solidworks
This commit is contained in:
@@ -460,6 +460,9 @@ class IfcImporter():
|
|||||||
for prop_name in schema.ifc.psets[new_pset.name]['HasPropertyTemplates'].keys():
|
for prop_name in schema.ifc.psets[new_pset.name]['HasPropertyTemplates'].keys():
|
||||||
prop = new_pset.properties.add()
|
prop = new_pset.properties.add()
|
||||||
prop.name = prop_name
|
prop.name = prop_name
|
||||||
|
# Invalid IFC, but some vendors like Solidworks do this so we accomodate it
|
||||||
|
if not pset.HasProperties:
|
||||||
|
return
|
||||||
for prop in pset.HasProperties:
|
for prop in pset.HasProperties:
|
||||||
if prop.is_a('IfcPropertySingleValue') and prop.NominalValue:
|
if prop.is_a('IfcPropertySingleValue') and prop.NominalValue:
|
||||||
index = new_pset.properties.find(prop.Name)
|
index = new_pset.properties.find(prop.Name)
|
||||||
|
|||||||
Reference in New Issue
Block a user