Shape rotates after splitting connector

Started by zhuravsky, March 12, 2024, 04:40:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zhuravsky

Help me, please with following problem: I have a stencil with shapes, which can split connectors when dropping. By unknown reason some of shapes rotates 180° deg after connector splitting, but some shapes - no.
I attached an example of such shapes.
I made some experiments and found, that somehow this effect interconnected with configuration of connection point section of ShapeSheet. If in problematic shape delete connection point where (Height*1) and after that insert it again with the same formula, then problem disapears.
(Visio 2016 Pro)

wapperdude

Did a quick look.  Confirmed the issue.

I duplicated the exponential shape and still has problem.  Duplicated the deadband shape.  Both it and orginal split connector nicely.  I noticed that deadband has a 3rd control point.  Deleted it.  Now the shape rotates 180deg on split.

Haven't pursued this any further.
Visio 2019 Pro

zhuravsky

Looks like effect also depends on how many connection points shape has (odd or even)...

Surrogate

#3
I use this trick for prevent this issue. Hope it can helps...

UPDATE: I found this description
Quote from: MS in article Connection Points Row Remarks
Cells in the Connections. name row are labeled DirX/A, DirY/B, and Type/C because these rows can be extended or non-extended rows.

Most connection points (all connection points created through the user interface) are non-extended and have DirX, DirY, and Type cells. Their row type is visTagCnnctPt or visTagCnnctNamed.

In non-extended rows the DirX and DirY cells together define a direction vector that influences the rotation of shapes involved in connections using the connection point. If both are zero the point is directionless. Connection points are of the following types:


  • Inward (0), which means that shapes glue to them. This is the default.

  • Outward (1), which means these connection points will glue to inward connection points.

  • Both inward and outward (2), in which case the direction is the inward direction, which is reversed if used as an outward connection.


Extended rows have A, B, C, and D cells and behave like directionless non-extended rows of type Inward. Extended rows are not commonly used, but you might use them to associate data with a connection point in the A, B, C, and D cells. Their row type is visTagCnnctPtABCD or visTagCnnctNamedABCD. Extended rows can be identified by the presence of a formula in the D cell.

wapperdude

Couple additional points:
1) If you set gluing to include Shape Geometry, then you don't need connection points
2) A shape without connection points can split a connector.  See green shape in attached file
3) The connector may be glued via walking glue, see the Yellow Shape, connected to center bottom of top shape.  Note, in this case, the split connector still uses walking glue.  Thus, the connection will walk as Yellow shape is moved.  2nd note:  Yellow shapes have 4 dedicated connection points.
4) If a connector was glued to connection points, then when split, the new connections are also glued to nearest connection point.  See the right most Yellow shape.

5) When the connection points were added to the Yellow shape, default GUI settings were used.  Except last point.  It was manually added.
Visio 2019 Pro

wapperdude

#5
Curious, why are you saving file to vsd and not vsdx?

I did more testing, and found some curious things.  I copied your troublesome shape and pasted into my file.  It still behaves strangely but doesn't do the 180 rotate.  Haven't fixed the shape, so Surrogate's approach seems best for now.  I did notice a few odd things beween your file and mine, and things in the shapesheet.

1) I saved your file as vsdx.  But behavior still odd wrt splitting.  The newer Visio versions, at least V2019, do not required connection points in the dropped shape.  Not sure when that changed.  There are other odd behaviors beside that.

2) You mentioned issue with upper connection point.  In V2019, to split a connector, you don't need to add any connection points to the shape.  But, it doesn't seem to work with your file.  I suspect that's because you 1st saved as vsd.

3) In Control Point section, two controls are hard locked to connection points.  That eliminates the usefulness of the control point.  Is there a reason for this?
4) Those same two control points have named rows that end with .X or .Y.  This is a problem.  X and Y are cell names.  This is causing some confusion for the dynamic cells.  Rename those rows.

5) Not serious, but the Action section isn't used, delete it.

Fixing these does help the splitting behavior to a small degree.  However, the shape still has issues.

My recommendation:  re-build the shape from scratch in a new file.  Test it frequently to verify that it works as expected.  Do this often.  Perhaps you can catch which step introduces the splitting problem.  Once you have a completed, tested, working shape, then copy paste into your origingal file and verify performance.  Hopefully, all works correctly.
Visio 2019 Pro

wapperdude

#6
Couldn't leave this alone.

When all else fails, try something else... So I ungrouped and regrouped.  Problem went away.

I would still rename the Control rows, and check their functionality.
Visio 2019 Pro

zhuravsky

Curious, why are you saving file to vsd and not vsdx?
- I prefer VSD because thre is no difference if it has macro inside or not

In V2019, to split a connector, you don't need to add any connection points to the shape
- I NEED connection point with specially assigned name and located in exact place. I do not like how Visio defines connections automatically.

In Control Point section, two controls are hard locked to connection points.  That eliminates the usefulness of the control point.  Is there a reason for this?
- Functionality of connection point stays the same, control was used only for getting help when mouse pointer stops over control. Here I found only one issue - control sometime covers handles and changing of size will be difficult. By the way, when you create shape, control does not cover the handle, problem comes only after I drop shape form stencil.

Those same two control points have named rows that end with .X or .Y.  This is a problem.  X and Y are cell names.  This is causing some confusion for the dynamic cells.  Rename those rows
-No

Not serious, but the Action section isn't used, delete it.
-No, let it be for "following expansion"