Search code examples
visio

How does one add labels to connector ends in visio?


I'm doing some network documentation in visio 2306 and want to add port numbers to the ends of the connectors. Seeing the UML class arrows, this is obviously possible to do, but I have no luck in replicating that.

Steps so far:

  • Make a new connector
  • Convert connector to group
  • Make text fields
  • Add the text fields to the group

This almost works: the connector still functions nicely and the text boxes seem to attach to the ends.

In practice this still has 2 problems:

  • The size scales relatively to the size of the connector
    • Even when that has been turned off in the shape behaviour
  • The position scales relative to the center of the connector
    • Even though the text label does stay nicely attached to the connector end.

Maybe some VBA is required? I haven't looked into VBA much yet, maybe that's why I havent found a solution yet.

I have looked in the shape sheet as well, but editing the PinX and PinY value doesn't seem persist after dragging the attached shapes around.


Solution

  • In the end I got it working like this:

    • Make a new connector
    • Convert connector to group
    • Make text fields
    • Add the text fields to the group
    • Add connection points to the connector (they stay at a fixed distance from the end, it's the way the UML arrows work around the issue)
    • Use the shapesheet to bind the textfields to the connection points.