You need to look at DirX/A and DirY/B in the ConnectionPts section.
Here is some VBA code from Chris Roth, in his pre-MVP days (!!!) - it will
show you the type and direction of each connection point in the selected
shapes. Tyy changing the DirX and DirY of a point and you will see the
angle of the connector:
'Visio Connection Point Tools
'
'You may freely distribute this file to others but,
'don't be a profit-seeking jerk about it!
'
'Cheers,
'
'Chris Roth
'(e-mail address removed)
'
http://www.users.qwest.net/~chrisroth/
'October, 2001
Sub SetDirection()
Dim shp As Visio.Shape
Dim sel As Visio.Selection
Dim iCt As Integer
Dim r As Visio.Row
Dim dx As Double, dy As Double
Dim dw As Double, dh As Double
Set sel = ActiveWindow.Selection
Const TOL = 100000
For Each shp In sel
dw = shp.Cells("Width").ResultIU
dw = Int(dw * TOL) / TOL
dh = shp.Cells("Height").ResultIU
dh = Int(dh * TOL) / TOL
For i = 1 To shp.RowCount(visSectionConnectionPts)
Set r = shp.Cells("Connections.X" & i).ContainingRow
dx = r.Cell(visX).ResultIU
dx = Int(dx * TOL) / TOL
dy = r.Cell(visY).ResultIU
dy = Int(dy * TOL) / TOL
If dx = 0 Then
r.Cell(visCnnctDirX).ResultIU = 1
r.Cell(visCnnctDirY).ResultIU = 0
End If
If dx = dw Then
r.Cell(visCnnctDirX).ResultIU = -1
r.Cell(visCnnctDirY).ResultIU = 0
End If
If dy = 0 Then
r.Cell(visCnnctDirX).ResultIU = 0
r.Cell(visCnnctDirY).ResultIU = 1
End If
If dy = dh Then
r.Cell(visCnnctDirX).ResultIU = 0
r.Cell(visCnnctDirY).ResultIU = -1
End If
Next i
Next
End Sub
Sub DisplayConnectionPtsForSelectedShapes()
Dim doc As Visio.Document
Dim mst As Visio.Master
Dim sel As Visio.Selection
Dim shp As Visio.Shape, shpCP As Visio.Shape
Dim i As Integer, j As Integer, iCt As Integer
Dim dx As Double, dy As Double
Dim r As Visio.Row
Dim sFrml As String, sID As String
Set doc = Visio.ActiveWindow.Document
Set sel = ActiveWindow.Selection
Set mst = ThisDocument.Masters("Connection Point")
For Each shp In sel
iCt = shp.RowCount(visSectionConnectionPts)
If iCt > 0 Then
For i = 1 To iCt
Set r = shp.Cells("Connections.X" & i).ContainingRow
sID = shp.NameID
dx = r.Cell(visX).ResultIU
dy = r.Cell(visY).ResultIU
shp.XYToPage dx, dy, dx, dy
Set shpCP = ActivePage.Drop(mst, dx, dy)
shpCP.Cells("User.dx").FormulaU = sID & "!Connections.A" & i
shpCP.Cells("User.dy").FormulaU = sID & "!Connections.B" & i
shpCP.Cells("User.type").FormulaU = sID & "!Connections.C" &
i
sFrml = "ANGLETOPAR(User.ang," & sID &
"!Width,ThePage!PageWidth)"
shpCP.Cells("User.angParent").FormulaU = sFrml
sFrml = "PAR(PNT(" & sID & "!Connections.X" & i & "," & sID &
"!Connections.Y" & i & "))"
shpCP.Cells("PinX").FormulaU = sFrml
shpCP.Cells("PinY").FormulaU = sFrml
Next i
End If
Next
End Sub
Sub DeleteConnectionPointShapes()
Dim shp As Visio.Shape
Dim i As Integer, j As Integer
Const LAYER_NAME$ = "Connection Point Documentation"
For i = ActivePage.Shapes.Count To 1 Step -1
Set shp = ActivePage.Shapes.Item(i)
'Debug.Print shp.Layer.Name
For j = 1 To shp.LayerCount
If shp.Layer(j).Name = LAYER_NAME$ Then
shp.Delete
Exit For
End If
Next j
Next i
End Sub