Field in ShapeData corrupt after Upgrade to Visio365

Started by mfPanter, November 04, 2024, 09:13:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mfPanter

Hello
We use Visio to create our PIDs. Everything works fine in the 2010 version. When we open an old Visio drawing with Visio 365, at least two fields in the Shape Date are corrupted.
In the ShapeSheet: The field "Nominal size" was set as type 4 and in the format with a list.
After the upgrade, the type is now 0.
If I solve this problem in the shapesheet table for the shape with AK No. PL1.54.001 (Valve.72), save the document and close Viso. When I open the document again, the type is 0 again and my text has not been saved.
When I enter data, close the dialog and reopen it. The data were not saved.
Is this issue known? Can I repare the existing diagrams?

Best regards
MF

Yacine

#1
Hi,

Yes, it does look like the shape itself is corrupted. I selected it and replaced it with a "Ventil" master, which fixed the list. The good news is that all other values, except for the size, are preserved. You'll only need to update the size values for the valves.

Another advantage is that you can select all the valves and replace them in one go.

As for the size values, I noticed one valve had a value of ";1." If this indicates it was meant to be the first value, you could first iterate through the valves, save these values elsewhere, and then rewrite them by code. Note that when replacing shapes, they get a new ID, so you'll need an alternative way to identify them later for the rewrite operation.

Out of curiosity (since I also work on P&IDs), I took a look at the other shapes. Nice work – it's really interesting how focused it is on the electrical aspects of the setup. I'd love to learn more about your methods!

----
The replacement operation:
Manually:
https://support.microsoft.com/en-us/office/replace-one-shape-with-another-176a89ea-9638-4d35-b04b-6eddd0850016
By code:
Dim shp As Visio.Shape
Set shp = ActivePage.Shapes("NameDesShapes")
shp.ReplaceShape MasterOrMasterShortcutToDrop:=MasterShape, ReplaceFlags:=visReplaceShapeDefault
Yacine

mfPanter

Hi Yacine
Thank you very much for your answer and your compliment regarding our shapes.

I could exchange the shape and now we have back our variable list selection. Unfortunately when I select a diameter from the list or enter a value and close the dialog the entry is not recorded. When I modify other fields, close the dialog and reopen it the changes are visible.

Do you may have a solution for this also?

Best regards
MF

PS. learning from my methods: we could have a chat via Teams if you are interessed.

Yacine

Hi MF,
The issue with the diameter should be the same as the previous problem. Make sure that the diameter works well in the master. (Drop it on the drawing and check the behavior). If not working, check the format and type cells of the diameter row. If that doesn't work too, rebuild the master.
Afterwards, select the corrupt shapes in the drawing and replace them by the master.

As for a teams meeting, I would welcome it. I'll send you my email address in a PM. Time: preferably later in the afternoon.
We can even set up a bigger meating. I had one in German with Thomas Winkel, some weeks ago.
We could also hold it in English, then more members would participate.
Yacine

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 193 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1045KB.
Tokens: post-login.
Cache hits: 13: 0.00245s for 26,543 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]