BIM: Fix ArchReference problem caused by TNP code

Due to TNP code Document.xml can contain (for example)` <Part ElementMap="0.4" file="Box001.Shape.brp"/>` instead of `<Part file="Box001.Shape.brp"/>`.
This commit is contained in:
Roy-043
2024-12-14 22:15:17 +01:00
committed by Yorik van Havre
parent e698c73a3a
commit 844d88fb7a

View File

@@ -402,7 +402,7 @@ class ArchReference:
writemode = False
elif "<Property name=\"Shape\" type=\"Part::PropertyPartShape\"" in line:
writemode = True
elif writemode and "<Part file=" in line:
elif writemode and "<Part" in line and "file=" in line:
n = re.findall(r'file=\"(.*?)\"',line)
if n:
part = n[0]