Closed FROGGS closed 2 years ago
I just stumbled across another example:
<Shape ID="146" NameU="Dynamic connector.41" IsCustomNameU="1" Name="Dynamischer Verbinder.41" IsCustomName="1" Type="Shape" Master="5">...</Shape>
So not even NameU
is reliable.
Thanks for flagging this - I expect I need to create a dict/map of translations for these kind of comparisons - and need to take account of the possible name.number format also.
Dave
Hello - I have added langauge mapping for this comparison and included in release v0.5.4. Please me know if that helps. Note that when creating a new connector via Connect.create() the tool copies content from an included media.vsdx file which will have the name in English language.
You could perhaps also check the master shape.
Its PageSheet/Section[N="Layer"]/Row[IX="0"]/Cell[N="NameUniv"]
has a value of Connector
.
To be clear, I dont actually need a fix for this. I merely am about to write a software that also parses vsdx files, and reviewed your code for inspiration.
Hi @FROGGS - that looks really helpful. Thanks for the tip. Hope you found something useful in the source,
Implemented as Shape.universal_name
in v0.5.5 - thank you :)
Hi, here you check the
Name
attribute of a shape against a known value: https://github.com/dave-howard/vsdx/blob/6e98f01e4726b7785a76fde82d2356d7041319e2/vsdx/shapes.py#L490Though, in my German version of Visio it will contain a German translation, see:
You might want to use the
NameU
attribute instead.This is Visio Standard 2016 if that matters.