Added auto renaming for null project name (#2478)

Sorry it took me almost a year to implement @aothms excellent suggestion!
https://github.com/IfcOpenShell/IfcOpenShell/issues/1954#issuecomment-1002463624
This commit is contained in:
garylzimmer
2022-10-07 05:36:25 -04:00
committed by GitHub
parent 34aff01eb2
commit 3b81c158f3
+1 -1
View File
@@ -91,7 +91,7 @@ class P62Ifc:
root = tree.getroot()
self.ns = {"pr": root.tag[1:].partition("}")[0]}
project = root.find("pr:Project", self.ns)
self.project["Name"] = project.find("pr:Name", self.ns).text
self.project["Name"] = project.findtext("pr:Name") or "Unnamed"
self.parse_calendar_xml(root)
self.parse_calendar_xml(project)
self.parse_wbs_xml(project)