Checkout this function. Because of late bind, enumerator orignal value are
written here instead of orignal enum. This is returning connection point
collection. In case of any query, contact me on my msn messenger
(
[email protected])
Thanks
Shahzad Godil
Karachi-Pakistan
' Get the collection of link points from shape line
Private Function GetLinkPoints(objShape As Object) As Collection
On Error GoTo ErrorHandler
' Get first point of link
Set GetLinkPoints = New Collection
Dim objPoint As New SigmaFlowV2.point
objPoint.x = ConvertToTwips(objShape.CellsSRC(1, 4, 0))
objPoint.Y = GetReverseYPoint(objShape.CellsSRC(1, 4, 1)) -
GetFirstDepartmentTop
GetLinkPoints.Add objPoint
Set objPoint = Nothing
' Get all points from second to second last point
Dim n As Integer
objShape.Cells("ConLineJumpCode") = 1
For n = 1 To objShape.Section(10).Count - 3 ' visSectionFirstComponent =
10
Set objPoint = New SigmaFlowV2.point
objPoint.x = ConvertToTwips(objShape.Section(10).Row(1 + n).Cell(0)
+ objShape.CellsSRC(1, 4, 0) - objShape.Section(10).Row(1).Cell(0))
objPoint.Y = GetReverseYPoint(objShape.Section(10).Row(1 +
n).Cell(1) + objShape.CellsSRC(1, 4, 1) -
objShape.Section(10).Row(1).Cell(1)) - GetFirstDepartmentTop
GetLinkPoints.Add objPoint
Set objPoint = Nothing
Next
' Get last point of link
Set objPoint = New SigmaFlowV2.point
objPoint.x = ConvertToTwips(objShape.CellsSRC(1, 4, 2))
objPoint.Y = GetReverseYPoint(objShape.CellsSRC(1, 4, 3)) -
GetFirstDepartmentTop
GetLinkPoints.Add objPoint
Set objPoint = Nothing
Exit Function
ErrorHandler:
GblWriteLog "SFVisioImport", "GetLinkPoints", "D"
End Function