VBA Bug in connecting shapes in Org chart

Started by pavane, September 09, 2019, 07:38:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pavane

I think I have found an obscure bug in Visio. It is rather complex to describe, though.
As previously mentioned, I have written VBA to load test scripts from Excel into Org charts.
(This enables me to check existing scripts for errors and duplicates)

The test steps and expected results are created as Manager shapes, in a hierarchy.
In the simplest case, a test step (manager) will own an expected result, and an expected result will own another test step.

Due to it being written in an old version of Visio, the manager is connected to its owner by dropping the shape at the known location of its owner. This works fine until we come down to a specific level of the hierarchy.
This only visible when loading a test script with 23 test steps, therefore the org chart has reached 47 levels.

At that point, Visio refuses to connect to the correct owner, even if the newer shape.autoconnect method is used.

The resulting shape's connectors do not contain a connection to an owner pointer.

The Sheet field "User.Parloc" (from the manager I am trying to connect) shows the details of the correct owner, so Visio clearly knows about it, but still refuses to actually make the connection.

Thus  LOCTOLOC(PNT(Manager.402!LocPinX,Manager.402!LocPinY),Manager.402!Width,ThePage!PageWidth)

In fact, it refuses to connect the shape to anything at all
The ultimate result is that the owner's connections are corrupted that the two shapes then own each other.

It can be corrected by manually editing the chart, but not by VBA.

It always happens at a specific depth in the Org chart, not related to the Excel text. I have tried different Excel charts with the same result.
Subsequent shapes are correctly connected (but to the corrupted shape)

So how do I go about reporting this? To Microsoft?

pavane

Actually, connecting manually doesn't work properly either, and layout page gives strange results. It must be an undocumented restriction on the depth of the chart