Line Not on Grid

need more help please…

this is my fucntion to add a port:
Public Sub AddAnchorPoint(ByVal Spot As Integer, ByVal Portstyle As GoPortStyle, ByVal View As Draw.GoDrawView)
Dim op As New GoDGMPort()
op.Style = Portstyle op.Selectable = True op.Movable = True op.ToSpot = Spot op.FromSpot = Spot op.Location = View.LastInput.DocPoint If TypeOf View.Selection.Primary Is GoDGMNode Then Dim o As GoDGMNode = CType(View.Selection.Primary, GoDGMNode) op.Location = o.Location op.SetSpotLocation(op.ToSpot, o, op.ToSpot) o.Add(op) Else op.Location = View.LastInput.DocPoint View.Document.DefaultLayer.Add(op) End If End Sub
and when I user the following procedure to add the port
AddAnchorPoint(GoObject.MiddleLeft, GoPortStyle.TriangleMiddleLeft, myView)
and do a link to the port there is a small offset when I hide the port for printing. How can I align the line exactly on the Grid?

The “from spot” of that port is under the tip. So, when you hide the port, you see the link that starts under the tip. to move the start point to the left, you’ll have to override the Port’s GetFromLinkPoint (and GetToLinkPoint perhaps) to offset the start point 1 to the left.

thanks for the pointer -