Connection point direction arrows missing in Developer Mode

M

Maggie

I cannot set the direction of my connection points. I
can't get the green arrowhead to appear, even in Developer
Mode. I added connection points to a custom shape, but
can't re-driect the direction of the connection. I cannot
even tell which direction it is going to connect from
unless I actually connect that particular point.
Please help!
Thanks!
 
M

Mark Nelson [MS]

That capability is no longer available in Visio. You need to go into the
Shapesheet to edit the angle of the connection point directly.
 
G

Geert Vancompernolle

Hi,

This one also interests me...

Mark tells to change the angle in the connection point section of the
corresponding shape sheet. However, I don't see a field in the connection
section where you can change the angle of the connection point. The only
angle field I see is the one of the Shape Transform, but that might not be
the one addressed by Mark.

Where can I find this angle field? The only behaviour change I know, is
when you right-click on the connection point. Then you can select between
Inward, Outward or Inward/Outward . But that's all I can find about
changing the direction of the connection point.

--Geert
 
D

David Parker

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top