Open kempeng opened 10 months ago
I ran into the same problem. I modified the code so it would: shapes.py starting at line 151: geometrys = self.xml.findall(f'{namespace}Section[@N="Geometry"]') for geometry in geometrys: if type(geometry) is Element:
self.geometry = vsdx.Geometry(xml=geometry, shape=self)
if geometry.attrib.get('IX') is not None:
self.geometry.index = geometry.attrib['IX']
else:
self.geometry.index = 0
for r in geometry.findall(f"{namespace}Row"):
row_type = r.attrib['T']
if r.attrib.get('IX') is not None:
row_type = f"{row_type}/{r.attrib['IX']}"
else:
row_type = f"{row_type}/0"
if row_type:
for e in r.findall(f"{namespace}Cell"):
cell = vsdx.Cell(xml=e, shape=self)
key = f"Geometry/{self.geometry.index}/{row_type}/{cell.name}"
self.cells[key] = cell
so if you have:
Keep in mind this will break certain functions like line_to_x, but if you've gotten this far, just call the cell_val yourself
Hi Dave,
Is my understanding from the shapes.py code correctly that you currently do not support the reading of multiple geometry sections defined in a single shape record?
I have come across several examples of such cases.
Geert